Skip to main content
Solved

Update and append a field in pipefy with api

  • August 5, 2020
  • 1 reply
  • 922 views

Nigel O'connell
Pipefy Staff
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?

 

Best answer by Marcos Carvalho

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 =)

View original
Did this topic help you find an answer to your question?

1 reply

Marcos Carvalho
Pipefy Staff
Forum|alt.badge.img+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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings