cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bfausti
Resolver I
Resolver I

Escaping apostrophes or single quotes in filter clause

I am having issues trying to escape an apostrophe in a property address for a filter in my flow.

Here is how I am trying to escape it:

bapps_propertyname eq replace('@{triggerOutputs()?['body/gbca_propertyname']}','''','\''')

 

Here is my flow step:

bfausti_0-1664420034847.png

 

Here is the error after the flow runs:

bfausti_1-1664420090825.png

 

Error details:

bfausti_2-1664420108640.png

 

Any help would be much appricated

 

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
benfausti
New Member

Ok, I worked it out. The replace function needed to be inside the single quotes on the eq clause:

 

This:

bapps_propertyname eq '@{replace(triggerOutputs()?['body/gbca_propertyname'],'''','''''')}'

 

Instead of this:

bapps_propertyname eq replace('@{triggerOutputs()?['body/gbca_propertyname']}','''','''''')

 

Thank you for your help 🙂

View solution in original post

6 REPLIES 6
SudeepGhatakNZ
Super User
Super User

I know it might sound hilarious but you have to replace it with 4 single quotes (with two wrapped around so 6 in total)

replace(variables('YourField'),'''','''''')
If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

Thank you but tried this and it doesn't work, see below errors:

benfausti_0-1664425110058.png

 

benfausti_1-1664425121899.png

 

Any other suggestions?

benfausti
New Member

Ok, I worked it out. The replace function needed to be inside the single quotes on the eq clause:

 

This:

bapps_propertyname eq '@{replace(triggerOutputs()?['body/gbca_propertyname'],'''','''''')}'

 

Instead of this:

bapps_propertyname eq replace('@{triggerOutputs()?['body/gbca_propertyname']}','''','''''')

 

Thank you for your help 🙂

SudeepGhatakNZ
Super User
Super User

Awesome, can you please mark it as a solution so that it benefits others in the community?

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

**Ignore this**

 

I did try to but don't see the option anywhere?

 

benfausti_0-1664426201768.png

 

SudeepGhatakNZ
Super User
Super User

You need to select the post with my response.

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,273)