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 / PAD - Pass variable to...
Power Automate
Answered

PAD - Pass variable to Vbscript

(0) ShareShare
ReportReport
Posted on by 8

Hello, 

 

Here is the two line of code in vbscript. The userInput is text variable in PAD which has been passed to vbscript. 

 

id = %UserInput%
WScript.Echo id

 

It is getting this error when executing: 

(1, 6) Microsoft VBScript compilation error: Syntax error

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You probably need to encapsulate the variable in quotes, if it's not a numeric value.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • CristinaValdes Profile Picture
    65 on at


    Hello,

    You may have the % symbol, only for one variable you use %Yourvariable%, but if your code has the % symbol you need to escape it, you must put %% for each % symbol.

    Example:

    WScript.Echo id%%espanol.%%something %Yourvariable%

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 246 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 176

#3
Haque Profile Picture

Haque 157

Last 30 days Overall leaderboard