Learn how to read the formula column on monday boards using the platform API
The formula column calculates anything from simple mathematical equations to complex formulas. The API allows you to read the formula column.
Read a 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.
query {
items (ids:[1234567890, 9876543210]) {
column_values {
... on FormulaValue {
value
id
display_value
}
}
}
}import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });
const query = `query($itemIds: [ID!], $columnType:[ColumnType!]) { items (ids:$itemIds) { id column_values (types:$columnType) { column { title id } ... on FormulaValue { display_value } } } }`;
const variables = {
itemIds: [9571351485, 9572374902],
columnType: "formula"
};
const response = await mondayApiClient.request(query, variables);Fields
Field | Description |
|---|---|
column | The column the value belongs to. |
id | The column's unique identifier. |
text | Reading calculated values is not supported, so this field will return |
type | The column's type. |
value | Reading calculated values is not supported, so this field will return |
display_value | The formula column's content. Subject to the following limits:
|
