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.
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 🙋🏻♀️
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.
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 🙂
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 🙋🏻♀️
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!
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?
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.
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.
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 Infórmate sobre las funciones y prácticas recomendadas de Wrike
Elaine Wrike Team member Infórmate sobre las funciones y prácticas recomendadas de Wrike
Hi Elaine is there more formal documentation about how to do this yet?
Hi Florence Cao, I've asked our API experts from the Support team to reach out to you about this, they'll be in touch soon 🙂
Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Lisa Wrike Team member Become a Wrike expert with Wrike Discover
You really need to stop this whole "someone will reach out to you privately" thing and then not also follow up so that others can benefit from the learnings. I understand wanting to work 1x1 with someone to better assist with their particular situation, but if you shared the learnings from those conversations (whether here or by updating your documentation) others could find solutions without reaching out to you separately or having to ask other users here how they solved it (and quite possibly never get an answer).
The API still has major holes in it that if filled would negate the need for a lot of questions in this forum, so to Florence's point if you actually updated that to clarify specifics (such as exactly what key values are available for any given field, pointers on string/array construction, examples for every option, etc.) based on the conversations that have arisen in this forum that would be super helpful.
Thank you for sharing your feedback on our processes, Daniel Joelsson! I agree that that would be better, but for now, our Support team takes on everything related to API, and that's why we raise tickets for such queries. We will discuss your feedback internally and see what we can do 🙂 Thanks again for sharing your thoughts!
Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Lisa Wrike Team member Become a Wrike expert with Wrike Discover