web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Pass string with singl...
Power Automate
Answered

Pass string with single quote and special charecters to the URi field

(1) ShareShare
ReportReport
Posted on by 1,875 Season of Giving Solutions 2025
I have this "Send Http Request to SharePoint", which check if there is a Term equals the FolderName, as follow:-
 
 
now the main issue is with the highlighted parameter
 
where the value of the highlighted parameter  can have values such as:-
 
First-Example) Test Test2
 
Second-Example) Test ' Test
 
Third-Example) Test # Test
 
 
Now i were passing the parameters as-is `variables('FolderName')` >> which will work for the first-Example only.
 
So  i did this replace to be able to pass single quote  `replace(variables('FolderNameWithoutUnAllowedChars'),'''','''''')` >> which will work for the first-example & second-example only
 
Also if i only do this `encodeUriComponent(variables('FolderNameWithoutUnAllowedChars'))` without the replace >> this will work for First-example & Third-example only
 
So i did this to be able to pass single quote and special charecter such as "#" `encodeUriComponent(replace(variables('FolderNameWithoutUnAllowedChars'),'''',''''''))`  >> which work for all values..
 
 
 
 
My question is if i am ding things correctly ? is it normal to do replace() & encodeUriComponent() to pass parameters inside the Uri field? or there is a more straight forward approach?
 
Thanks
 
Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,874 Most Valuable Professional on at
    Some methods of Microsoft do include encoding, but this one unfortunately doesn't. That's why we need to include that ourselves.
     
    So, yes that approach looks fine and correct. I would approach it the same exact way and have no more straightforward suggestion 😁

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 889

#2
Valantis Profile Picture

Valantis 830

#3
Haque Profile Picture

Haque 505

Last 30 days Overall leaderboard