cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerappsMax
Helper II
Helper II

ODATA Filter Problem

Hello, 

 

Below is an example of a SQL table I am trying to retrieve certain records from using an ODATA filter query.

 

StatusCompany_NameValue
ActiveTTT1
ActiveTTT34
InactiveSSS42
ActiveJJJ453
ActiveXXX23
InactiveXXX56

 

I am trying to pull records where the status is "Active" and only for records with companies, [TTT,SSS and XXX]

 

Is there a way to filter by an array? For example "Status eq 'Active' and Company_Name eq [XXX,SSS,TTT]"

 

Right now I am trying to do and statements and can't seem to figure out how to get this working correctly

 

Please let me know If I need to elaborate more and I apprentice any insight!

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Ashwin7104
Super User
Super User

Hey @PowerappsMax ,

 

I could think of the below logic. Please test and let know if it works for you

 

Status eq 'Active' and (Company_Name eq 'XXX' or Company_Name eq 'SSS' or Company_Name eq 'TTT')

 

Or use in operator

 

Status eq 'Active' and Company_Name in ('XXX','SSS','TTT')

View solution in original post

2 REPLIES 2
Ashwin7104
Super User
Super User

Hey @PowerappsMax ,

 

I could think of the below logic. Please test and let know if it works for you

 

Status eq 'Active' and (Company_Name eq 'XXX' or Company_Name eq 'SSS' or Company_Name eq 'TTT')

 

Or use in operator

 

Status eq 'Active' and Company_Name in ('XXX','SSS','TTT')

Worked perfectly, Thanks a lot!

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,217)