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

Notifications

Announcements

Community site session details

Community site session details

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

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

(1) ShareShare
ReportReport
Posted on by 1,811 Super User 2024 Season 1
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,189 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard