I would like to be able to change the fields on a pipe using an API. Use cases:
automatically synchronize product list with some accounding program (e.g. arcitle-lists from Sage) → change in Sage would lead to new selection options in select-input and/or lead to new input fields, e.g. for articles added in Sage which are accounted per hour
import/export pipes, e.g. between organizations or even from another service
Page 1 / 1
Hello, @genietim I hope everything is fine with you and your family. I did a quick demonstration of how to edit a field using our api. Check here 🔗 If you have any questions just let me know.
Step by step:
Mutations:
1. use mutation to get the field id.
{ pipe(id:yourpipeid) { id start_form_fields { id internal_id index_name label } phases { id name fields { internal_id id label } } } }
return:
{ "data": { "pipe": { "id": "your pipe id", "start_form_fields": [ { "id": "your field id", "internal_id": "your internal field id", "index_name": "your field index name", "label": "your field label" }, {
2. use mutation to change the field
mutation{ updateFieldsValues(input:{ nodeId: "your card ID" values: [ {fieldId: "field id that you would like to update", value: "value that you would like to insert"}] }) { clientMutationId success } }
:)
Hi @mozart-morales
Thanks for your answer. Unfortunately, this is not what I am looking for: I do know I can change the value, but what I want to do is to change the field itself (e.g. the select options for a checkbox/radio/select field) (resp. add a new field) using the GraphQL API.
I did find the relevant mutations though when I just checked again (I do not know why I did not find them the last few times):