Numbers

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

numbers

NumbersValue

  • Read: Yes
  • Filter: Yes
  • Update: Yes
  • Clear: Yes

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

columnColumn!

The column the value belongs to.

direction NumberValueUnitDirection

Placement of the unit symbol relative to the number.

left
right

id ID!

The column's unique identifier.

number Float

The column's numeric value.

symbol String

The unit or symbol applied to the value.

text String

The column's value as text. Returns "" if the column has an empty value.

type ColumnType!

The column's type.

value JSON

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

any_of

  • A numeric value
  • "$$$blank$$$" (blank values)

not_any_of

  • A numeric value
  • "$$$blank$$$" (blank values)

is_empty

[]

is_not_empty

[]

greater_than

A numeric value

greater_than_or_equals

A numeric value

lower_than

A numeric value

lower_than_or_equals

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

Send 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

Send 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
  }
}