cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rob_danks
Regular Visitor

Replace double quote with single quote

I have written a Power App for a user to select multiple Purchase order numbers and then trigger a Flow. The Purchase order numbers are passed to the Flow as a JSON I have have then used the Replace function to create a string as follows.

 

PurchaseOrderNumber eq "PO510004" or PurchaseOrderNumber eq "PO510002"

 

I need to replace the double quotes with single quotes to be able to use the string as a filter in the D365 FinOps 'List items present in a table' action, but the Replace function doesn't allow this as the expression below results in 'The expression is invalid'.

 
replace(outputs('POFilter'),'"',''')
 
Can anyone advise of a way to do this?
1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

There are a few different ways to do it, but here is an expression that will do it:

replace(outputs('Compose'), '"', decodeUriComponent('%27'))

change outputs('Compose') to whatever holds your filter string.

View solution in original post

3 REPLIES 3
Paulie78
Super User
Super User

There are a few different ways to do it, but here is an expression that will do it:

replace(outputs('Compose'), '"', decodeUriComponent('%27'))

change outputs('Compose') to whatever holds your filter string.

That worked a treat, many thanks.

Nutenbary
Frequent Visitor

had the same issue but the above wouldn't work for me, I had to actually distinguish left/right sided quote marks for some reason. 
in playing with a uri encoder i found this added info for each type of quote mark  note the differences in parenthseis (left“ neutral" right”) results in this:

left %E2%80%9C
neutral %22
right %E2%80%9D

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,011)