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 Automate
Unanswered

Syntax error

(0) ShareShare
ReportReport
Posted on by 48
Dear team,
 
I am assigning a variable, the value is URL and it contain % in the middle of the text. but when assign it's showing a syntax error. kindly help how can we assign a value which contain % in the middle of the text.
 
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    If you need to use `%` as a literal character in a URL, it must be encoded as `%25`. Using `%` alone without encoding can cause issues, as it might be interpreted as the start of a percent-encoded character sequence. For further reference: URL Encoding and what characters are valid in a URI
     
    If that doesn't resolve your issue, please show how the action is configured, the URL being used to set the variable, and the error message you are getting. 
  • Verified answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    Are you using Power Automate Desktop or Power Automate Cloud? If its Power Automate Cloud then do as @David_MA  suggested.

    In Power Automate Desktop (windows desktop application) you want to add an extra % -sing. So if the URL is "www.example.com/lets%20automate" then it needs to be "www.example.com/lets%%20automate". So you just add an extra percent sign since otherwise PAD thinks there is a variable reference that is not closed since PAD uses % -sings to refer to variables.

    So syntax error:


    No syntax error with the extra % -sign:



    Or you can make be be string: %'www.example.com/lets%20automate'%

     
  • BS-13080552-0 Profile Picture
    48 on at
    Thanks @eetuRobo and @David_MA
     
    I was using PAD. Thanks a lot

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