Skip to main content
Solved

Update database with connected cards

  • January 31, 2022
  • 1 reply
  • 292 views

jason147

Hi, I was wondering what API to use for updating databases based on their connected cards e.g. Data gets updated so I need to auto update the database OR a card gets moved to archive so I want to remove the Data

 

I am someone with very little coding knowledge (But I am learning, currently with html but moving onto python)

Best answer by Lucas Democh

 

@jason147 

To update a specific record, you can use this code (GraphiQL):

mutation{
  setTableRecordFieldValue(input:{
    table_record_id:XXXXXX #record's ID
    field_id:"field_id_here" #the field you want to update's field.
    value:"Field Value" # the field's new value you want to add to this record
  }) {
    clientMutationId
  }
}

 

To know the ID of the fields, use this:

 


{
  table(id:"XXXXXX"){
    table_fields{
      label
      id
    }
  }
}

 

To facilitate this process, you can create a custom field on your cards with the number of the connected record or parent card.

 

You can use the Pipefy interface to test the code, but beware of update/mutation tests:

https://app.pipefy.com/graphiql

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

1 reply

Lucas Democh
Forum|alt.badge.img+15
  • Pipefy Legend
  • 396 replies
  • Answer
  • January 31, 2022

 

@jason147 

To update a specific record, you can use this code (GraphiQL):

mutation{
  setTableRecordFieldValue(input:{
    table_record_id:XXXXXX #record's ID
    field_id:"field_id_here" #the field you want to update's field.
    value:"Field Value" # the field's new value you want to add to this record
  }) {
    clientMutationId
  }
}

 

To know the ID of the fields, use this:

 


{
  table(id:"XXXXXX"){
    table_fields{
      label
      id
    }
  }
}

 

To facilitate this process, you can create a custom field on your cards with the number of the connected record or parent card.

 

You can use the Pipefy interface to test the code, but beware of update/mutation tests:

https://app.pipefy.com/graphiql


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