Skip to main content

Notifications

Power Automate - Building Flows
Answered

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.
 
  • BS-13080552-0 Profile Picture
    BS-13080552-0 48 on at
    Syntax error
    Thanks @eetuRobo and @David_MA
     
    I was using PAD. Thanks a lot
  • Verified answer
    eetuRobo Profile Picture
    eetuRobo 2,678 on at
    Syntax error
    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'%

     
  • Suggested answer
    David_MA Profile Picture
    David_MA 8,884 on at
    Syntax error
    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. 

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard