The formula column calculates anything from simple mathematic equations to complex formulas. You can read the formula column via the API, but you currently cannot filter, update, or clear it.

Reading the formula column

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

Reading the calculated formula values is not supported but you can query metadata about the column.

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

Fields

FieldDescription
column Column!The column the value belongs to.
id ID!The column's unique identifier.
text StringReading calculated values is not supported, so this field will return null.
type ColumnType!The column's type.
value JSONReading calculated values is not supported, so this field will return null.

Workaround to read a column's formula

While the FormulaValue implementation doesn't allow you to read the formula in the column or its calculated values, you can query the column's settings_str to return the formula itself as JSON.

Sample query

query {
  boards (ids:1234567890) {
    columns (ids: "formula") {
      settings_str
    }
  }
} 

Sample response

{
  "data": {
    "boards": [
      {
        "columns": [
          {
            "settings_str": "{\"formula\":\"ADD_DAYS({date_1},15) \"}"
          }
        ]
      }
    ]
  },
  "account_id": 12345678
}

πŸ“˜

Join our developer community!

We've created a community specifically for our devs where you can search through previous topics to find solutions, ask new questions, hear about new features and updates, and learn tips and tricks from other devs. Come join in on the fun! 😎