AleksandrRogov / DynamicsWebApi

DynamicsWebApi is a Microsoft Dataverse Web API helper library for JavaScript & TypeScript
MIT License
268 stars 58 forks source link

How to filter for Multi-Select Option Set field? #125

Closed MrMoehner closed 1 year ago

MrMoehner commented 1 year ago

Hello,

i want to query an entitiy that contains a Multi-Select Option Set field. A request without filter works fine. I tried all different filter options that are described here. https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/multi-select-picklist?view=op-9-1

Equal collection=products&filter=businessareatypes eq '100000000' works, but only for entries with exactly this one attribute. Entries with several attributes are neglected. Furthermore i cannot combine it with any other filter condition. collection=products&filter=beegy_businessareatypes eq '100000000' and productnumber eq '123434' results in an empty array as result [ ]

Contains collection=products&filter=contains(beegy_businessareatypes,'100000000') ends in Error: The condition operator Like is not valid for MultiSelectPicklistAttribute type

In collection=products&filter=beegy_businessareatypes in ['100000000'] results in Error: The method or operation is not implemented.

I am not sure if the problem lays in here or in Dynamics itself. I would be grateful for every hint though how to solve the problem.

Thanks and regards

Moehner

AleksandrRogov commented 1 year ago

I am sorry, but the Issues on Git are related to the issues with DynamicsWebApi. This is not a forum for general Dynamics 365 questions. Please ask this question on StackOverflow or Dynamics forums. Also check out this one: #121 .