Long text

Learn how to filter by, read, update, and clear the long text column on monday boards using the platform API

The long text column holds up to 2,000 characters of text. The API allows you to read, filter, update, and clear the long text column.

Read a long text column

You can query the long text column using the column_values object that enables you to return column-specific subfields by sending a fragment in your query. Values for the long text column are of the LongTextValue type.

query {
  items (ids:[1234567890, 9876543210]) {
    column_values {
      ... on LongTextValue {
        text
        value
      }
    }
  }
}

Fields

FieldDescription
column Column!The column the value belongs to.
id ID!The column's unique identifier.
text StringThe column's long text. This field will return "" if the column has an empty value.
type ColumnType!The column's type.
updated_at DateThe column's last updated date.
value JSONThe column's JSON-formatted raw value.

Filter a long text column

Using the items_page object, you can easily filter a board's items by specific columns or column values. The table below contains the long text column's supported operators and compare values.

Operators

Compare values

any_of

  • The whole text value to filter by
  • "" (blank values)

not_any_of

  • The whole text value to filter by
  • "" (blank values)

is_empty

[]

is_not_empty

[]

contains_text

The partial or whole text value to filter by

not_contains_text

The partial or whole text value to filter by

Examples

The following example returns all items on the specified board with an empty long text column.

query {
  boards(ids: 1234567890) {
    items_page(
      query_params: {
        rules: [
          {
            column_id: "long_text"
            compare_value: [""]
            operator: any_of
          }
        ]
      }
    ) {
      items {
        id
        name
      }
    }
  }
}

Update a long text column

You can update a long text column using the change_simple_column_value mutation and sending a simple string in the value argument. You can also use the change_multiple_column_values mutation and pass a JSON string in the column_values argument.

Simple strings

To update the long text column, send a string with up to 2,000 characters.

mutation {
  change_simple_column_value(
    item_id: 9876543210
    board_id: 1234567890
    column_id: "long_text"
    value: "Sample text"
  ) {
    id
  }
}

JSON

To update the long text column using JSON, send the "text" key with up to 2,000 characters.

mutation {
  change_multiple_column_values(
    item_id: 9876543210
    board_id: 1234567890
    column_values: "{\"long_text\": {\"text\": \"Sample text\"}}"
  ) {
    id
  }
}

Clear a long text column

You can also clear a long text column using the change_multiple_column_values mutation and passing null, an empty string, or an empty object in the column_values argument.

mutation {
  change_multiple_column_values(
    item_id: 9876543210
    board_id: 1234567890
    column_values: "{\"long_text\": null}"
  ) {
    id
  }
}