Solved

Update database with connected cards

  • 31 January 2022
  • 1 reply
  • 256 views

Userlevel 2

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)

icon

Best answer by Lucas Democh 31 January 2022, 19:22

View original

1 reply

Userlevel 7
Badge +15

 

@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

Reply