cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lds
Frequent Visitor

CDS List Records filter via Odata on MultiSelect Options Set

Hi there, this is my first post and I am quite new to Flow.

 

I am trying to List Records via CDS, filtering on a field that is a MultiSelect Options Set.  If there is only 1 value in the Option Set the List returns the record as expected, however when there are multiple values, nothing is returned.  I have tried "contains" also but returns an error when using on a MultiSelection Option field.  From the screen shot below, if it was just Durif, the filter works fine, however with the 2 options it doesnt select a record.

 

CRM View.PNG

 

Odata Filter.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
lds
Frequent Visitor

Thanks for your help, we ended up creating a new string field, then a plugin that writes the values into this field on create and change.  We were then able to filter the records from the odata filter.

View solution in original post

5 REPLIES 5
Brad_Groux
Community Champion
Community Champion

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

lds
Frequent Visitor

I have a Canvas App that allows the users to fill out their search critiera, with the Variety being a Dropdown where they can select a single option.  On filling out the details they click the Submit button and it executes the Flow process.

 

Canvas App.PNG

 

The Flow process executes a series of filters based on the Entity to search against.  The Flow statement for the Variety field is below, using eq.  This works fine, as long as their is only 1 variety, the issues is though that it is a Multiselect option, so there is typically more varieties against the record. 

 

Odata Filter.PNG

 

I have tried using contains rather then eq, but that returns the below error message.  I have also tried containsvalues but that fails as it is not recognised.

 

"message": "BadGateway",
"innerError": {
"status": 502,
"message": "The condition operator Like is not valid for MultiSelectPicklistAttribute type",
 
Thanks for your help.

 

 

v-bacao-msft
Community Support
Community Support

Hi @lds ,

 

As far as I know, it is appropriate to use stringColumn or numberColumn as the filter field in Filter Query. For other field types, this does not work.

If you want to use Multiselect option type of field as a filter, you could consider using Filter array to filter the value of List reocrds output.

42.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lds
Frequent Visitor

Thanks for your help, we ended up creating a new string field, then a plugin that writes the values into this field on create and change.  We were then able to filter the records from the odata filter.

View solution in original post

masterus
Microsoft
Microsoft

For filtering MultiSelect Options Set you can use ContainValues operator:

 

 

?$filter=Microsoft.Dynamics.CRM.ContainValues(PropertyName=@p1,PropertyValues=@p2)&@p1='name'&@p2=['value','value']

 

 

 

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/multi-select-picklist#query...

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,540)