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 / Power Automate Desktop...
Power Automate
Answered

Power Automate Desktop - RPA javascript

(0) ShareShare
ReportReport
Posted on by 59

I'm trying to develop a flow -which requires javascript to be executed within steps. Question - How can I change a variable within javascript code?

I have the same question (0)
  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    @itssujeeth 

     

    I am a bit confused with your question, "Change a variable". You can click on fx and reference a variable.

     

    CFernandes_1-1602869138648.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

     

     

     

  • itssujeeth Profile Picture
    59 on at

    Sorry for being vague in my question. As part of my flow, I need a variable to be assigned a new value which needs to be calculation using a logic. An easy approach tried was to write a javascript implementation for this logic and trying to assign the value. But it doesn't work

  • Verified answer
    adijain Profile Picture
    Microsoft Employee on at

    Hello @itssujeeth,

     

    If you desire to change the value of a PAD variable using JavaScript, that can be done by echoing the result of your JS calculation using the command "WScript.echo("String") and then setting the variable that needs to be changed to the output result of the "Run JavaScript" action - screenshot below:

    adijain_1-1602879998990.png

     

    This will set the variable %JavascriptOutput% to "test". Hope it helps!

     

  • Devray Profile Picture
    2 on at

    I can use at input variables all pad variables (text format), but as output variable only one (wscript.echo...)? Is there any other option that I can output more variables ore change other pad variables value? 

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 312 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 154 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 143 Super User 2026 Season 2

Last 30 days Overall leaderboard