Hello,
I want to add an existing custom field to an existing custom form using the API.
I know how to get all custom fields assigned to a specific form using
https://<domainname>.my.workfront.com/attask/api/v15.0/ctgy/<customFormId>?fields=categoryParameters:parameter
but I don't know how to add another one to the categoryParameters.
Thanks in advance.
Regards
Lars
Solved! Go to Solution.
Thank to the help of the customer support, I can now share how to do this:
You first have to run a GET request to get all currently assigned fields / parameters:
https://<domain>.my.workfront.com/attask/api/v15.0/ctgy/<categoryID>?fields=categoryParameters:*
In the next step, you have to run a PUT call containing the previous parameters and the new one(s):
PUT HTTP REQUEST URL:
https://<domain>.my.workfront.com/attask/api/v15.0/ctgy/<categoryID>
JSON BODY:
{
"categoryParameters": [
{
"objCode": "CTGYPA",
"categoryID": "<categoryID>",
"customerID": "<customerID>",
"displayOrder": 1,
"hideFormulaFromDescription": false,
"isInvalidExpression": false,
"isRequired": false,
"parameterGroupID": "<parameterGroupID>",
"parameterID": "<parameterID>",
"rowShared": false,
"securityLevel": "LE",
"viewSecurityLevel": "V"
},
{
"objCode": "CTGYPA",
"categoryID": "<categoryID>",
"customerID": "<customerID>",
"displayOrder": 2,
"hideFormulaFromDescription": false,
"isInvalidExpression": false,
"isRequired": false,
"parameterGroupID": "<parameterGroupID>",
"parameterID": "<parameterID>",
"rowShared": false,
"securityLevel": "LE",
"viewSecurityLevel": "V"
},
{ "objCode": "CTGYPA", "categoryID": "<categoryID>", "customerID": "<customerID>", "displayOrder": 3, "hideFormulaFromDescription": false, "isInvalidExpression": false, "isRequired": false, "parameterGroupID": "<parameterGroupID>", "parameterID": "<parameterID>", "rowShared": false, "securityLevel": "LE", "viewSecurityLevel": "V" }
]
}
Views
Replies
Total Likes
Thank to the help of the customer support, I can now share how to do this:
You first have to run a GET request to get all currently assigned fields / parameters:
https://<domain>.my.workfront.com/attask/api/v15.0/ctgy/<categoryID>?fields=categoryParameters:*
In the next step, you have to run a PUT call containing the previous parameters and the new one(s):
PUT HTTP REQUEST URL:
https://<domain>.my.workfront.com/attask/api/v15.0/ctgy/<categoryID>
JSON BODY:
{
"categoryParameters": [
{
"objCode": "CTGYPA",
"categoryID": "<categoryID>",
"customerID": "<customerID>",
"displayOrder": 1,
"hideFormulaFromDescription": false,
"isInvalidExpression": false,
"isRequired": false,
"parameterGroupID": "<parameterGroupID>",
"parameterID": "<parameterID>",
"rowShared": false,
"securityLevel": "LE",
"viewSecurityLevel": "V"
},
{
"objCode": "CTGYPA",
"categoryID": "<categoryID>",
"customerID": "<customerID>",
"displayOrder": 2,
"hideFormulaFromDescription": false,
"isInvalidExpression": false,
"isRequired": false,
"parameterGroupID": "<parameterGroupID>",
"parameterID": "<parameterID>",
"rowShared": false,
"securityLevel": "LE",
"viewSecurityLevel": "V"
},
{ "objCode": "CTGYPA", "categoryID": "<categoryID>", "customerID": "<customerID>", "displayOrder": 3, "hideFormulaFromDescription": false, "isInvalidExpression": false, "isRequired": false, "parameterGroupID": "<parameterGroupID>", "parameterID": "<parameterID>", "rowShared": false, "securityLevel": "LE", "viewSecurityLevel": "V" }
]
}
Views
Replies
Total Likes