cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DarrylJP
Helper I
Helper I

AND/OR statement in Get Items Filter Query

I am trying to apply the following logic to a filter query but don't fully understand the proper syntax

 

I am trying to write:

 

StartswithA AND (StartswithB1 or StartswithB2)

 

I have this, but couldn't find anywhere that specified how to write it

 

startswith(RPATS_x0020_ID, 'S') and (startswith(Complaint_x0020_Status, 'O') or startswith(Complaint_x0020_Status, 'O'))

 

Any help appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @DarrylJP ,

 

If you are filtering items in a SharePoint List, then the expression you are using is correct.

Just make sure the field names are correct. Instead of configuring Filter Query, you can run Get items and view the names of these fields in the Body.

In addition, these fields need to be of type Single line of text.

1.PNG

Please check this blog and get more details about Filter Query:

https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Jcook
Super User
Super User

Hello,

Where are you applying this filter? Could you share a screenshot of the flow.

Most Odata filters uses the syntax: <column name> eq ‘<Value>’

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





v-bacao-msft
Community Support
Community Support

 

Hi @DarrylJP ,

 

If you are filtering items in a SharePoint List, then the expression you are using is correct.

Just make sure the field names are correct. Instead of configuring Filter Query, you can run Get items and view the names of these fields in the Body.

In addition, these fields need to be of type Single line of text.

1.PNG

Please check this blog and get more details about Filter Query:

https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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 (1,863)