Guide to Changing Column Values

Every monday.com board has one or more columns, each of which holds a particular piece of information. Each column has a certain type, and different column types expect a different set of parameters to update their values.

You will most likely need to change item column values in two scenarios: when updating the value of an item using the change_column_value() mutation, or when setting the initial values of an item using the create_item() mutation.

JSON vs. Strings Formatting

To update a column value, you should send either a JSON-formatted string or simple string in your mutation.

While all of the columns supported by our API will accept JSON formatting, not all of these columns will accept String formatting as well. At the bottom of this page you can find a list of columns that are supported.

When sending data to a particular column, use a JSON-formatted string (if you’re using Javascript, you can use JSON.stringify() to convert a JSON object into a string).

Changing a Single Column Value

To change a single column value, utilize either the change_simple_column_value() or the change_column_value() methods.

Depending on which column type's value you're attempting to change, it will necessitate a different method to use. Some columns will only accept JSON values, while others will accept both Strings and JSON values.

Changing Multiple Column Values

In addition to changing a simple column's values, you are also able to change multiple columns' values using the change_multiple_column_values() mutation. This mutation allows you to update multiple column values of a specific Item (row).

Each column is of a certain type, and different column types expect a different set of parameters to update their values. When sending data in the column_values argument, you can use either a String value, or a combined String and JSON value.

Here is an example of a column_values argument with a Text and a Status column using a String:
{"text": "New text", "status": "Done"}.

Here is the same example of a column_values argument with a Text and a Status column using a combined String and JSON value:
{"text": "New text", "status": {"label": "Done"}}.

In the second example, you can see that the Status column is sent a JSON value of {"label": "Done"}, instead of the String value "Done" sent in the first example.

Setting Column Values upon Item Creation

Much like setting column values with the change_column_value(), the change_simple_column_value(), and the change_multiple_column_values(), setting column values upon item creation involves sending JSON values.

Removing Column Values

To remove a column value (i.e. delete an existing column value), send either an empty string for Text and Number columns, or send an empty object for columns that accept JSON values.

Raw JSON (use this in your column values variables): JSON.stringify({});

JSON string (use this in the GraphiQL editor): "{}"

📘

NOTE

Removing the column value of a File column requires explicitly setting the clear_all flag as this action cannot be undone.

Raw JSON (use this in your column values variables):
JSON.stringify({ "clear_all": true });

JSON string (use this in the GraphiQL editor): "{\"clear_all\":true}"


Did this page help you?