Solved

Update a Table Record

  • 7 October 2020
  • 4 replies
  • 214 views

Userlevel 3

I'm trying to update custom fields in the table record, but it seems the API only permits to update

the title and due date.

That mutation should work, isn't it?

mutation {

updateTableRecord(

input: {

id: %(id)s

fields_attributes: %(fields_attributes)s

}

The custom fields it is the field_attributes, in the follow way:

field_attributes = [

{"field_id": "field_id_1", "field_value": "field_value_1"}]

Any clues to update custom fields rather the title in Table Records?

icon

Best answer by Nicole Chiroli 7 October 2020, 20:14

View original

4 replies

Userlevel 7
Badge +10

Hello, @Sérgio Moreira. How are you doing today?

You can update all of the fields, not only title and due date.  It would really depend on the types of fields you have, but you can search for the fields and how to use it in our documentation, inside the GraphiQl itself.
 


 


I hope this helps. If you have any other questions, I am here. 

Userlevel 5
Badge +4

Hello @Sérgio Moreira! Just complementing @Nicole Chiroli’s answer, here is an example of how you can update a certain record’s specific field using this mutation. 

 

mutation{
setTableRecordFieldValue(input:{
table_record_id:1234567 #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
}
}


In case you want to find the field’s ID, you can run this query


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

 

Userlevel 1

Hello @Sérgio Moreira! Just complementing @Nicole Chiroli’s answer, here is an example of how you can update a certain record’s specific field using this mutation. 

 

mutation{
setTableRecordFieldValue(input:{
table_record_id:1234567 #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
}
}


In case you want to find the field’s ID, you can run this query


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

 

Hi, I’m trying to update/add assignee to a table record field using their contact ID but I’ve been struggling terribly. I can update/add other record fields, using the above code, such as email address and phone numbers but the assignee one is return empty value ({'data': {'setTableRecordFieldValue': {'table_record': {'id': 'record_id', 'title': 'record_name'}, 'table_record_field': {'value': '[]'}}}}).
I’m really new to this pipefy api, can anyone please help?

Userlevel 6
Badge +4

@jnihorimbere Open a new topic asking for help, here it will be harder for someone to help you :)

Reply