Skip to main content
Solved

Setting assignee via contact id number to a table record field


jnihorimbere

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

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

{theIdOfTheAssignee2},

{theIdOfTheAssignee3}

]
`, 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.

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

4 replies

genietim
Forum|alt.badge.img+12
  • Pipefy Legend
  • 412 replies
  • August 31, 2021

A working query could look like this:

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

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 “”).

 

Best,

 

Tim


jnihorimbere
  • Author
  • New Member
  • 2 replies
  • August 31, 2021

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?


genietim
Forum|alt.badge.img+12
  • Pipefy Legend
  • 412 replies
  • Answer
  • August 31, 2021

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

{theIdOfTheAssignee2},

{theIdOfTheAssignee3}

]
`, 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.


tsartori
Forum|alt.badge.img+4
  • Superuser
  • 157 replies
  • September 1, 2021

Any more trouble?


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

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