Solved

Updating Label Select Fields

  • 2 February 2021
  • 2 replies
  • 653 views

Userlevel 5

Hi, I'm trying to update fields in a card, no problem with texts and dates so far, however, I don't know how to change Label Select fields or Assign To fields. This is an example of what I've been trying:{
""query"": ""mutation{ updateCardField(input: {card_id: 25250812 field_id: \""priority\"" new_value: \""Medium\"" }){ card{ id } } }""
}Response doesn't throw an error, but the card is not updated.

 

Thanks in advance.

icon

Best answer by Roberto Chavarria 2 February 2021, 21:51

View original

2 replies

Userlevel 6
Badge +5

Hi Amanda! Updating a label field requires you to send as an input an array containing the ids of the labels you want to set.

Here is an example of how you can get the IDs of your labels in the pipe using our IDE (https://app.pipefy.com/graphiql) :

{
pipe(id:12345){
labels {
id
name
}
}
}

 

And here is the mutation for how to update the Field Value of labels:
 

mutation{
updateCardField(input:{
card_id:25250812
field_id:"priority"
new_value:"MEDIUM_LABEL_ID"
}) {
clientMutationId
success
}
}

 

Userlevel 4
Badge +1

:thinking: Jorge aka Amanda? 

Reply