Setting multiple custom field values via API

We have predefined custom fields, some of which allow multiple values. I need to be able to set multiple values on custom fields when I am creating (or modifying) projects/folders with the API. The documentation indicates that custom field values must be strings (not arrays of strings as one might expect for being able to specify multiple values).

I have tried the following three experiments:

1. Using an array of strings in spite of what the documentation says. This results in a "bad request" error.

2. Adding multiple values in the same string separated by newlines (trying both unix style and windows style newlines). This results in the creation of a new value for the field that combines the specified values, changing the newlines to spaces.

3. Using the same custom field ID multiple times in the customFields array, once for each value needed. This results in a "bad request" error also.

I'm out of ideas.

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

Hello John Winger, welcome to the Community 👋🏻

I see that you're already in touch with our Support team regarding your question. Please let me know if I can help with anything else 🙋🏻‍♀️

Cansu Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover

Cansu Wrike Team member Become a Wrike expert with Wrike Discover

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

I did finally end up with a solution that works. It's non-obvious and a little odd why it would be done this way. The custom field value specified on a folder/project can, in fact, only be a string. So instead of allowing for the value to be an array of values, you create the array and then stringify the array and use that string as the value.

For example:

Take an array like this: ["Value 1","Value 2"] and send it as "[\"Value 1\",\"Value 2\"]"

I have successfully set multiple values using this arrangement in my tests.

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

Thank you for posting the solution! I see way too many posts here where a support ticket is referenced instead of an actual solution and there is no follow-up, leaving the rest of us with the same question still without a solution.

This particular post was serendipitously timed as I was just trying to figure this out myself today and I am sure this saved me a lot of time because that solution would not have been anywhere near the top of my list of things to try 🙂

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

Hello John Winger, and welcome to the Community Daniel Joelsson 👋🏻

Great to hear that you've found a solution with our Support team! Just for clarity, the reason behind the support tickets is a majority of the cases require sharing of possibly sensitive data that couldn't be posted on public space. We're usually trying to come back to the thread and post the solution from Support if it's similar to this query and the comment here to notify our members to expect an email from our Support.

Please feel free to bump any threads that you don't see any solutions you believe should be publicized and let me know if I can help with something else 🙋🏻‍♀️

Cansu Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover

Cansu Wrike Team member Become a Wrike expert with Wrike Discover

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

Hello, I think I have a similar issue to this thread. I have a SharePoint list with a single line text column and I'm using Workato on the Wrike Integrate plan to update a project with a multi-select custom field in Wrike every time a new row is added. Unfortunately, I've tried a number of things to convert to array, string, etc., while searching for tips and cannot get Wrike to recognize the input as multi-select values.

The SharePoint list can be any order or combination of the multi-select options in Wrike. For instance, the output from SharePoint could be a text value of "Paid,Social,Customer Training,SEO/Web" or "Social,Paid" etc.

In Workato, I'm currently using the Update project in Wrike app action, but I could switch to a custom Wrike app action if there is a better method that way.

Can someone recommend a solution to input this into the multi-select custom field in Wrike where it recognizes the individual values but applies them all to the same project's field? Thanks!

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

Hi Kimber,

Not knowing what exactly is going wrong for you, nor having any clue what you mean by "SharePoint" or "Workato", it's difficult to grasp where your issue might lie but here are some pointers that perhaps can help:

You need to structure your output to Wrike as an array, even if there is only one selection - using the example from John Winger's post above, a single value should look like "[\"Value 1\"]" (i.e. an array with a single element in it).

Of course it's also important to make sure any characters that may be a problem are escaped - otherwise you'll get a bad response from the Wrike API.

Also, if it's a multi-select field that implies the value has to exist as an option in Wrike. If it does not, Wrike will sometimes accept it anyway but may not.

Hope that helps, if not maybe more information about your situation and what exactly is not working might help?

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

Hi Daniel,

Thank you for your comment, however, I've tried John Winger's suggestion already and I was not successful. I'm hoping a Wrike community member or someone using Workato with their Wrike Integrate plan may be able to help here.

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

Checking on here again to see if a Wrike super user or admin can help me solve for this multiple custom field values issue I have with Workato using the Wrike Integrate plan.

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

Hi Kimber Karn, thanks for getting back in touch here. I've asked our support team to reach out to you on this. If you need anything else let us know 👍

Elaine Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover

Elaine Wrike Team member Become a Wrike expert with Wrike Discover

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

Folllowing List for Post: Setting multiple custom field values via API
[this list is visible for admins and agents only]

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