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 / Set radio button check...
Power Automate
Answered

Set radio button checked by using 'Run Javascript function on web page' action

(0) ShareShare
ReportReport
Posted on by 14

Hello,

 

I tried to run the following code to set 'other' radio button checked but it did no work, wonder why... Is it because I can only get  but can not set values with 'run js action'?

 

function ExecuteScript() {
 document.getElementById("other").checked = true;
}

 

aipet_0-1613263144810.png

 

Thanks

I have the same question (0)
  • Verified answer
    miketran13 Profile Picture
    720 on at

    Hi,

     

    First, you can use other action to set the state for the radio button, you don't need to use JS script. In the below image, I used "Set check box state on web page" and it works well for my example. 

    Screenshot 2021-02-16 134752.png

    Secondly, as I know, you are using w3schools.com for trying the JS script and it does work for your JS script because w3schools.com page embedded an iframe in the page, so JS script will not work with the iframe. You can see my image in below, I copy the html content, and saved it as a html file in my computer, then I run the JS script, it works well then.

     

    html.png

    Thanks and hope it can help you. 

    Mike

    ---------------------------------

    Did I answer your question? Please consider to Mark my post as a solution! to guide others

  • Shrav Profile Picture
    Microsoft Employee on at

    Hello,

     

    You can use the Run JS action to set attributes as well. It just depends on the nature of web page that you're working on.

    Mike has explained this well in his answer.

     

    The better option would be to use the actions in PAD directly to set the radio buttons.

    You can use the Set Radio Button on Web Page action to do this

    Shrav_0-1613602408306.png

     

    Thanks,
    Shrav

  • aipet Profile Picture
    14 on at

    Thanks Mike.

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 282 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 159 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 146 Super User 2026 Season 2

Last 30 days Overall leaderboard