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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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

Worked perfectly, Thanks a lot!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,545)