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 / How to use my variable...
Power Automate
Unanswered

How to use my variable in JS activities

(0) ShareShare
ReportReport
Posted on by 21

Hi everyone!

I have a JS script, that I launch in web-automatization.

I want to take to my function my variable data, that I calculated in flow before.

 

For example:

In flow I have calculated the variable "x".

x = test

 

And I have a function "testfunction()"

How I can put "test" to "testfunction"?

 

testfunction(%x%) didn't work.

 

Thanks!

I have the same question (0)
  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at
    testfunction("%x%")
  • Akobir Profile Picture
    21 on at

    It didn't work too.

    Moreover - Power Automate makes '' by itself.

  • tkuehara Profile Picture
    667 on at

    Hi @Akobir 

     

    Just use it in your JS function. For example:

    I'm trying to get the value from a given month stored at the %lookForMonth% variable

    Data source

    tkuehara_0-1626807997724.png

    PAD flow with variable %lookForMonth% set to March

    tkuehara_1-1626808025973.png

    JS function with the variable

    tkuehara_5-1626808354944.png

    Variable %Result% value after running

    tkuehara_3-1626808233036.png

     

  • Akobir Profile Picture
    21 on at

    Hi @tkuehara 

    Maybe you can help me again.

    I want to send json in my function, but json is in my variable.

     

    This one

    let json=JSON.parse(%jsonString%);

     is don't work. 😞

    Maybe you know, what I need to do?

     

    Thank you in advance!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 481

#2
11manish Profile Picture

11manish 278

#3
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

Last 30 days Overall leaderboard