Setting assignee via contact id number to a table record field

  • 31 August 2021
  • 4 replies

Userlevel 2

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 setTableRecordFieldValue, such as email address and phone numbers but the assignee one 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?


Best answer by genietim 31 August 2021, 18:28

View original

4 replies

Userlevel 7
Badge +12

A working query could look like this:

mutation {
setTableRecordFieldValue(input: {
table_record_id: {yourCardId},
field_id: "{yourFieldId}",
value: [{theIdOfTheAssignee}]
}) {

Note that you have to replace all things I wrote in “{}” with your corresponding value. The card ID and the ID of the assignee are numerical values, wheras the field id is a string (as indicated with the “”).





Userlevel 2

Thank you for your response, really appreciated.
What if I want to add to what is already in the table field?

How do I go about doing that?

Userlevel 7
Badge +12

The `value` field is an array. This means, if you want to add multiple assignees, you would set the value to `value: [{theIdOfTheAssignee1},



`, etc.

If you want to add to the current value, you will have to query the current value and then just set the value to the existing array with the addition of the assignees you want to add.

Userlevel 7
Badge +4

Any more trouble?