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

Quote filter or quote in the replace function not working

Hi,

 

I have done multiples researches for my situation but I didn't find any clue to resolve my issue :

 

I have built a flow which is getting all items from a Sharepoint list (filtered -> no problem with that).
Based on the result, for each result, the flow will select any result from the same Sharepoint list where two values are the same as the one selected : Rue (street in english) and Numéro maison (house number in english).

But I have a problem because sometimes, in Belgium, you have the character ' in the street name and the filter is not working

My filter is : Rue eq '@{items('Pour_chaque_membre')?['Rue']}' and Num_x00e9_ro_x0020_maison eq '@{items('Pour_chaque_membre')?['Num_x00e9_ro_x0020_maison']}'

My two columns are string in my sharepoint list

 

The problem is when the flow came across a street with a ', the flow is failing because the request is not valid

 

I saw that you have to double the quote when you have a quote in the value but as the request is done one time I don't see how can I correct this problem.

I tried also to delete all the ' in the column Rue in my sharepoint list and try to put a replace function in my flow dedicated to add an item to my shrepoint list. But whatever I tried with the replace function, it's not accepted by Microsoft Flow and it says my formula is not accepted. I tried these :

replace(trim(body('Recevoir_les_détails_des_réponses')?['r6152ae5d9d784df884bc170282640e9a']);"'";" ")

replace(trim(body('Recevoir_les_détails_des_réponses')?['r6152ae5d9d784df884bc170282640e9a']);'''';' ')

replace(trim(body('Recevoir_les_détails_des_réponses')?['r6152ae5d9d784df884bc170282640e9a']),'''',' ') etc.

 

I'm not sure if I need to use , or ; as I'm in Europe and everything is in French

 

Anyone have a clue ?

If something is not clear, don't hesitate to ask, my mind is on a break right now 😄

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Quote filter or quote in the replace function not working

Hi @v-bacao-msft,

 

Thanks for your reply.
As the replace function is not compatible in the filter query, I tried again the replace function when I'm entering the record in my sharepoint list (second part of my first post).
And it worked with : replace(trim(body('Recevoir_les_détails_des_réponses')?['r6152ae5d9d784df884bc170282640e9a']),'''',' ')

 

I thought I tried it yesterday but I might missed it, we'll never know 🙂

 

So case resolved ! Thanks for taking the time to reply to me !

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Quote filter or quote in the replace function not working

 

Hi @JeremyVdB ,

 

Could you share a screenshot of the action configuration?

Please refer to the blog below for more details on Filter Query:

https://veenstra.me.uk/2018/11/12/microsoft-flow-filter-queries-in-sharepoint-get-items/

https://toddbaginski.com/blog/use-dynamic-odata-filter-values-in-a-microsoft-flow-sharepoint-getitem...

https://blog.ion.works/2019/03/17/common-odata-filters-for-microsoft-flow-a-reference-chart-for-user...

In addition to the field name, please try to not configure Filter Query first, then get the field name in Get items-Body and configure it in Filter Query.

Please take a try again.

 

Update:

replace() function is not supported in 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.
Highlighted
Frequent Visitor

Re: Quote filter or quote in the replace function not working

Hi @v-bacao-msft,

 

Thanks for your reply.
As the replace function is not compatible in the filter query, I tried again the replace function when I'm entering the record in my sharepoint list (second part of my first post).
And it worked with : replace(trim(body('Recevoir_les_détails_des_réponses')?['r6152ae5d9d784df884bc170282640e9a']),'''',' ')

 

I thought I tried it yesterday but I might missed it, we'll never know 🙂

 

So case resolved ! Thanks for taking the time to reply to me !

View solution in original post

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,172)