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.

View solution in original post

ViditGholam
Responsive Resident
Responsive Resident

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (28,150)