Return multi-select custom field SELECTED values for a task

For tasks in a specific folder, I have created a custom filed called "Impacted Area(s)" that has many values to choose from.  I also created a Request Form that shows the values of this field where the requester can select 1, some, or all of the values in "Impacted Area(s)".  The selected values are stored in the submitted task (which works great).

I am trying to use the Wrike API to show the values selected.

I am using the following call to return the field values for one of these tasks:
https://www.wrike.com/api/v4/tasks/{Task ID}.

In the resulting JSON, the following is returned:
                    "id": "[Impacted Area(s) ID]",
                    "value": "[\"Data\",\"Analytics\"]" 

the selected Impacted Area(s) are returned in the "value" field.

If I use the following call to return the field values for the custom field, it shows all of the potential values for the custom field (which is no good to me)... see the API call below:
https://www.wrike.com/api/v4/customfields/{Custom Field ID}.

How do I return the selected values for the "Impacted Area(s)" field as selected for the created task?

1
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
1 comment

Don't quite get what you mean, isn't your call to https://www.wrike.com/api/v4/tasks/{Task ID}. already returning you the selected values in json array form as per your post?

The API method https://www.wrike.com/api/v4/customfields/{Custom Field ID} is meant to get the definition of the Custom Field, which what you've experience is the intended behaviour.

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Folllowing List for Post: Return multi-select custom field SELECTED values for a task
[this list is visible for admins and agents only]

Top
Didn’t find what you were looking for? Write new post