web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SharePoint Get Items o...
Power Automate
Unanswered

SharePoint Get Items oData Filter

(0) ShareShare
ReportReport
Posted on by

Hello everyone:

 

I have a flow like the below:

1) Get all items from a SPO list (list a)

2) Iterate through the returned items from "list a"

3) Perform a filter get items on "list b" comparing several columns between "list a" and "list b"

4) Flow in to a conditional

 

Quick flow overview:

 

Flow0.jpg

 

The title field contains values like: "New York's greatest stuff" in "list a" and I need to compare the title field between "list a" and "list b". The issue is when the "get item 2" runs, the filter fail with an error:

 

The expression "Title eq 'New York's Greatest Stuff'" is not valid. Creating query failed.
clientRequestId: 0f6281e8-93de-47ee-9cf5-234278d309ee
serviceRequestId: 0f6281e8-93de-47ee-9cf5-234278d309ee 

 

It seems the apostrophe in the title name is throwing it out. I had thought about doing a filter like:

 

equals(items('Apply_to_each')?['Title'],item()?['Title']) eq true (as shown below):

 

Flow1.jpg

 

But I get the following error:

 

Column 'True' does not exist. It may have been deleted by another user.
clientRequestId: a79b682b-b0e5-41d9-a7f2-76a0976da7ed
serviceRequestId: a79b682b-b0e5-41d9-a7f2-76a0976da7ed

 

Is there a way on the Get items 2 filter to do what I am trying to do? Wrap the column in an expression to perform an equals or strip out the apostrophe so I can compare strings? It seems whatever the function evaluates to, the filter assumes it is looking at column name.

 

Does that make sense?

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @MCraig78 ,

    I think the Filter Query can process only filters in format <column name> <operator> '<value>'.

    But if the problem are apostrophes in the <value>, you can preprocess the data by replacing ' with '' (one apostrophe with 2 apostrophes), two apostrophes are taken as an apostrophe inside the <value>, one apostrophe is closing the <value>.

     image.png

    So instead of the <value> directly, you can use replace expression with a ton of apostrophes, this will search for ' in the <value> and replace them with '', which can be then used in the Filter Query.

    replace(<value>,'''','''''')

    image.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard