cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Escape Single quote from string

Hi All,

I am creating folders in SharePoint using ms flows.  flowimage1.png

it works perfectly when "Output" does not have "single quote" in that. when there is single quote let say Output value is "CustomName'Test" it fails because of quote. 

 

how can I escape that single quote. I don't want to replace that single quote with blank or any other value. 

2 REPLIES 2
Highlighted
Super User II
Super User II

Re: Escape Single quote from string

Hello @vaishalivyas1 

Please, have a look at this post by @PieterVeenstra on handling apostrophes and single quotes in Flow: https://sharepains.com/2019/10/07/handling-apostrophes-in-microsoft-flow/

Basically, you should insert a "\" character before the quote character, with the following expression: replace(outputs(),””,’\”’)

Hope it helps!

Ferran

 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
Highlighted
Dual Super User III
Dual Super User III

Re: Escape Single quote from string

Hi @vaishalivyas1 

 

You can also try this method: Intialize a variable with quote and enter value as a single quote and then use the expression below:

ffre.PNG

 

Expression: 

replace(triggerBody()['text'],variables('quote'),'')
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,920)