API query with customFields values array

I am querying Tasks using /tasks API GET request. I need to filter my request by a custom field I am adding a customField filter to it.

It works fine for a single value, e.g. customField={id:'fieldId', value:'Belarus'} works great, however if I am trying to use values the filtering does not happen, i.e. customField={id:'fieldId', values:['Russian Federation', 'Belarus'] is completely ignored.

This attribute (values) is described in the API documentation (https://developers.wrike.com/api/v4/tasks/) but does not appear to work and I cannot find any example of querying by customField with multiple values. Is a bug or an issue with my request?

thank you!

0
10 comments
Spot On Innovative Approach Stellar Advice

Hi Ilya Kochetov, welcome to the Community! 🙂

I'm going to raise a ticket with our Support team for you so that they can look into this and advise. Someone will reach out to you 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

0
Spot On Innovative Approach Stellar Advice

We are currently having the exact same issue, we also tried to specify a comparator and it's telling us our `customField` parameter is invalid.

customField={id:'fieldId', values:['Value1', 'Value2'], comparator: "InRange"}

We tried `InRange`, `Contains`, `ContainsAny` with no success.

1
Spot On Innovative Approach Stellar Advice

Hi Alexandre Giard, our Support team is in touch with you via email in relation to this. 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

Can you tell me what the solution is to this to pulling multiple values?

0
Spot On Innovative Approach Stellar Advice

Hi Ken Hayes, thanks for posting! Could you please let me know the type of custom field you are using (text, dropdown, multiple choice, etc.)? 

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

It's a dropdown. 

Multiple values (returns error when adding 'comparator'):

Removed 'comparator' and query good, but returns ALL values ... and I need it to return results where either of those values are correct:

Only use one value (and no comparitor) and works correctly .. however, this means I have to pull multiple queries for each folder just to get the records where the custom field equals the values I need to pull

0
Spot On Innovative Approach Stellar Advice

(note: added wrong screenshot at end - but you get the point - it works :)

0
Spot On Innovative Approach Stellar Advice

Hi Ken Hayes, I see that you're in touch with our Support team, please let me know if I can help you 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

Adding response from Wrike support here to help others:

I can see that you're using the 'ContainsAny' comparator. 'ContainsAny' can only be used with collection field types: multi-select and users.

Would be helpful if the documentation indicated this.  Support team kept sending me to the list of 'tasks' and 'custom fields' but I don't see anywhere in the documentation that you are unable to pull a query for two values (using ContainsAny) if it's only specific field types.  Would have saved a lot of headache and time. 

1
Spot On Innovative Approach Stellar Advice

Thank you for sharing the response here Ken Hayes🙌🏼

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

Folllowing List for Post: API query with customFields values array
[this list is visible for admins and agents only]

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