Dependency

The dependency column allows you to set up items to be dependent on a different item in the same board. This can be then represented in the Gantt View or Widget visually, or used in combination with automations.

Check out our help center to learn more about the dependency column.

Reading the dependency column

You can only return the data in a dependency column in one format. The value field will return the data as a JSON string. The text field will always come back blank.

Here is an example payload showing both fields:

{
  "text": "",
  "value": "{\"linkedPulseIds\":[{\"linkedPulseId\":2973227079}]}"
}

Updating the dependency column

You can update a dependency column with a JSON string. Simple string updates are not supported.

JSON

To add a dependent-on item to the dependency column, send the item IDs as an array. If the items sent do not belong to the board(s) that are connected, an exception will be raised.

Code example

mutation {
  change_multiple_column_values (item_id:1587277166, board_id:1587277136, column_values: "{\"dependent_on\" : {\"item_ids\" : [1587277166]}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    'query' : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id } }",
    'variables' : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: YOUR_ITEM_ID,
      myColumnValues: "{\"dependent_on\" : {\"item_ids\" : [1587277166]}}
    })
  })
})
curl "https://api.monday.com/v2" \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization:MY_API_KEY" \
-d '{"query":"mutation{change_multiple_column_values(item_id:162169283, board_id:162169280, column_values:\"{\\\"dependent_on\\\" : {\\\"item_ids\\\" : [1587277166]}} \" ){name}}"}'

📘

Do you have questions?

Join our developer community! You can share your questions and learn from fellow users and monday.com product experts.

Don’t forget to search before opening a new topic!


Did this page help you?