Solved

Update and append a field in pipefy with api

  • 5 August 2020
  • 1 reply
  • 828 views

Userlevel 5
I have a Long text field in a parent card that should be updated with the Long text values from various connected child cards. Each update should show. In other words:
Parent card Comment field:

Updated comments 1 from Child card #1
Updated comments 1 from Child card #2
Updated comments 1 from Child card #3
What is the API call to update & append a field?

 
icon

Best answer by Marcos Carvalho 18 August 2020, 15:50

View original

1 reply

Userlevel 6
Badge +6

Hey Nigel, how are you?

In order to do that you need to query the data from each child card:

 

{card(id:321654987){fields {
name
value
}}}

 

Then update the parent card field with it's ID's and values using the mutation updateFieldsValues.

 

mutation{
updateFieldsValues(input:{
nodeId:321654987987 ##Card ID you want to update
values:[{fieldId: "field_id", value:"field value"}] })
{
clientMutationId
success
}
}

 

 

The updateFieldsValues is a replace mutation so you need to query and save the previous data in order to update it with previous and new data.

 

Hope it helps you =)

Reply