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.

Our API supports this column, so you can read and update the dependency column via the API.

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.

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

Updating the dependency column

JSON

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

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.

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]}}
    })
  })
})

Clearing the dependency column

You can clear the dependency column using a change_multiple_column_values mutation like the one below.

mutation {
 change_multiple_column_values(item_id: 2973227079, board_id: 2973227049, column_values: "{\"dependent_on\" : {}}") { 
  id
 }
}

You can also find the Postman request to clear the dependency column here.

πŸ“˜

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!