cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PH68
Frequent Visitor

SharePoint Get Items Filter Query not saving trailing quote when querying by string field

When working with a Flow, I regularly need to use the SharePoint Get Items action with a filter query to filter the items returned by various criteria. If for example I want to filter the list using a string filter on the Title column of the list using dynamic content I would enter something like the following:

Title eq 'Field'   where the Field part will be dynamic content from a related item in the Flow.

If I save the Flow and then run it, it will always fail reporting an error with the filter query due to the trailing quote character being deleted. If I go back in and add the missing quote and save again it works fine. To reproduce, go into an existing Flow and add a SharePoint Get Items action, choose a site and list to get items from then in the Filter query apply a filter to a string filter as in my example above then save and close the Flow. When you then re-edit the Flow and come back to the Filter query you will see that the trailing quote is missing. Add the missing quote, save and close the Flow then come back again and you will see the quote has saved the second time around.

In case it makes a difference, I type out the query exactly as it is:-  Title eq ' then select the dynamic content then enter the trailing quote character

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @PH68 ,

 

Thanks for your reply, I have tried to follow the steps you provided to reproduce a similar error.

However, no similar errors were encountered when creating Flow in solution or creating similar flows in my flows.

178.PNG

Have you ever created a new Flow and see if similar errors can be reproduced?

 

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

5 REPLIES 5
v-bacao-msft
Community Support
Community Support

 

Hi @PH68 ,

 

I'm afraid I don't understand what the scenario you describe is, and it seems that I have never encountered a similar problem here.

 

Did you create the flow in Solution?

 

Please consider providing more details so that we can better understand the issue you encounter.

 

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.

In the example I've given you, I went to Power Automate and created a new Flow when a record got updated in Dynamics CRM. I then need to get items in a SharePoint list that match that item - list item Title equals the Account Name from Dynamics. So I add the SharePoint Get Items action, choose the site and list and add the Filter Query as in this screenshot:

SharePoint_GetItems_BeforeSave.PNG

I finish the rest of the Flow setup and save the Flow. When I come to run it the Flow fails on this step. I edit the Flow and come back in to this step and view the setup and it appears like this:

SharePoint_GetItems_AfterSaveAndReOpen.PNG

The failure is caused by the trailing quote character (apostrophe) missing from the Filter Query. I've been noticing this behaviour for some time now, this is the first chance I've had to record it. Any thoughts?

v-bacao-msft
Community Support
Community Support

 

Hi @PH68 ,

 

Thanks for your reply, I have tried to follow the steps you provided to reproduce a similar error.

However, no similar errors were encountered when creating Flow in solution or creating similar flows in my flows.

178.PNG

Have you ever created a new Flow and see if similar errors can be reproduced?

 

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

This has been happening for a little while now, I've had it occur on our tenant and on the tenant of one of our clients too. I will have a lot more to do soon so I will further check when I do and report back.

PH68
Frequent Visitor

I've not been working much on this for a while but I did recently create some new Power Automate Flows, part of which involved updating a hyperlink on a list item to have a different display which can only be done using the Send HTTP Request action and I had the same problem there both in the Url field for the POST action and also in the body part too. The problem only seems to occur when the last character of a particular entered value is an apostrophe and it's following a dynamic field value. More often than not now I use the concat function to avoid the issue which is why I don't see it so much now.

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.

Top Solution Authors
Top Kudoed Authors
Users online (3,083)