Learn how to filter by, read, update, and clear the numbers column on monday boards using the platform API
The numbers column stores numeric values (floats or integers) and may optionally include a unit or symbol.
Via the API, the link column supports read, filter, update, and clear operations.
Column Type | Implementation Type | Supported Operations |
|---|---|---|
|
|
|
Queries
Numbers columns can be queried through the column_values field on items queries using an inline fragment on NumbersValue.
query {
items(ids: [1234567890, 9876543210]) {
column_values {
... on NumbersValue {
number
id
symbol
direction
}
}
}
}Fields
You can use the following fields to specify what information your NumbersValue implementation will return.
Field | Description | Enum Values |
|---|---|---|
column | The column the value belongs to. | |
direction | Placement of the unit symbol relative to the number. |
|
id | The column's unique identifier. | |
number | The column's numeric value. | |
symbol | The unit or symbol applied to the value. | |
text | The column's value as text. Returns | |
type | The column's type. | |
value | The column's JSON-formatted raw value. |
Filter
You can filter items by numeric values using the items_page object. The numbers column supports the following operators:
Operators | Compare Values |
|---|---|
|
|
|
|
|
|
|
|
| A numeric value |
| A numeric value |
| A numeric value |
| A numeric value |
Example
This example returns all items whose number column value is greater than 5.
query {
boards(ids: 1234567890) {
items_page(
query_params: {
rules: [
{
column_id: "numbers"
compare_value: [5]
operator: greater_than
}
]
}
) {
items {
id
name
}
}
}
}Mutations
Update
You can update a numbers column using change_simple_column_value or change_multiple_column_values. You can send values as simple strings or JSON objects, depending on the mutation you choose.
change_simple_column_value
change_simple_column_valueSend a string containing an integer or float.
mutation {
change_simple_column_value(
item_id: 9876543210
board_id: 1234567890
column_id: "numbers"
value: "3"
) {
id
}
}change_multiple_column_values
change_multiple_column_valuesSend an integer or float as a JSON string in column_values.
mutation {
change_multiple_column_values(
item_id: 9876543210
board_id: 1234567890
column_values: "{\"numbers\": \"3\"}"
) {
id
}
}Clear
You can clear a numbers column using change_multiple_column_values by passing null or an empty string in column_values.
mutation {
change_multiple_column_values(
item_id: 9876543210
board_id: 1234567890
column_values: "{\"numbers\": null}"
) {
id
}
}