cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tarjani
Advocate III
Advocate III

Filtering OR expression

Hi all,

I'm trying to list all active records that have a field (ec_noc) that has either value of '2' or '3'.  I think what I need to do is to use the connector for List all Records and put an expression into the Filter Rows field.

The two expressions that I've been able to come up with so far (and are not working) are: 

ec_noc eq 948180002 or 948180003

((using this link as reference https://diyd365.com/2019/11/20/every-power-automate-ms-flow-filter-query-you-ever-wanted-to-know-as-... ))

/Certification?$filter=ec_noc eq 948180002 or ec_noc eq 948180003
((using this link as reference: https://docs.mendix.com/refguide/odata-query-options AND https://www.odata.org/documentation/odata-version-2-0/uri-conventions/ ))


Would greatly appreciate feedback on this!

22 REPLIES 22

The other thing I've been trying to do is to consider the Choice field as its own entity.

I think the issue is that while there is an option set/choice field that is on the Certification entity but it reads the values from a global option set/choice field.  The global aspect means that the values themselves are on another entity/record.   Previously, before OptionSets were renamed to Choices, we found that we would have to do a separate Get records of the Choice Field for NOC Type. 

Looking a the old customisation view to see this as separate to the Certification record:

Tarjani_3-1616725352176.png

This screen shot shows where I'm trying to list the entities for the choice/option set field.  It is still called option set, rather than choice.   I haven't figured out how to filter this as the name is ec_noctype (the same as on the certification entity).  But this is where I"m at right now.

Tarjani_9-1616725819553.png

Hi @ViditGholam ,
Just thought I'd let you know that I managed to get the fetch to work.  When the row for the ordering attribute was removed I was able to get the flow to run through the condition successfully.  So the fetch below is what was successful.

 

 

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="vin_certification">
<attribute name="vin_certificationid" />
<attribute name="vin_name" />
<attribute name="createdon" />
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="ec_noctype" operator="in">

<value>948180003</value>

<value>948180002</value>

</condition>
</filter>
</entity>
</fetch>


Thanks for all your suggestions and guidance on this, it was really appreciated.

ViditGholam
Continued Contributor
Continued Contributor

Hi @Tarjani  I am not really sure if it will take the values from the global option set as you mention the entity name and id in the Fetch XML. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,202)