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 / How to set a value for...
Power Automate
Unanswered

How to set a value for a variable by script

(0) ShareShare
ReportReport
Posted on by 42

I'm a beginer of PAD, now I have a question:

If I have a python script that can generate a series of data and I want to write it in a way that the generated numbers are saved into an existing variable, how should I write it? Is there any documentation to explain this, or are there any examples available?

lebao1_0-1702620213789.png

lebao1_0-1702621950854.png

 

 

Any assistance would be appreciated!

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @lebao1 ,

     

    I've made a test for your reference:

    vbofengmsft_0-1702621834206.png

    Result:

    vbofengmsft_1-1702621857612.png

     

    Best Regards,

    Bof

     

     

  • lebao1 Profile Picture
    42 on at

    Thank you @v-bofeng-msft 

    But I run my python script, nothing output to %PythonScriptOutput2%

    lebao1_0-1702622230924.png

    lebao1_1-1702622259033.png

     

     

  • v-bofeng-msft Profile Picture
    on at

    Hi @lebao1 ,

     

    Please try:

    var n = 1;
    WScript.Echo(n);

     

    Best Regards,

    Bof

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 331 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 203 Most Valuable Professional

Last 30 days Overall leaderboard