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 Check Multiple ...
Power Automate
Answered

How to Check Multiple Checkboxes with a Single "Set Check Box State" Action?

(2) ShareShare
ReportReport
Posted on by 116
Hi everyone,

I’m using the "Set check box state on web page" action to select checkboxes, but I need to check all "Temperature Sensor" checkboxes at once.
Is there a way to do this with just one action, or do I need separate actions for each checkbox?


Thanks for your help!

I have the same question (0)
  • Verified answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at
     
    You can achieve this by these 2 below methods.
     
    1. Use a loop with UI elements:
    • First, identify all checkboxes related to "Temperature Sensor" on the page.
    • Use a loop to iterate through each matching checkbox element and set its state to checked.
      This requires capturing all those checkboxes as separate UI elements or by indexing them if they share similar selectors.
    2.  Inject JavaScript (if allowed):
    If you can run JavaScript on the page via Power Automate's "Run JavaScript function on web page" action, you could run a script that finds all checkboxes with a certain attribute or label and checks them all at once.

     
    Example query: document.querySelectorAll('input[type="checkbox"][data-label="Temperature Sensor"]').forEach(cb => cb.checked = true);
     
    (Note:- if you got your solution you can mark as solution and gives kudos)
     
    Thanks & Regards
    Vishnu Reddy
  • Verified answer
    Riyaz_riz11 Profile Picture
    4,048 Super User 2026 Season 1 on at
    Hi
     
    Use JavaScript to Check All "Temperature Sensor" Checkboxes
    Insert a "Run JavaScript function on web page" action.
    Use the following JavaScript code:
    document.querySelectorAll('input[type="checkbox"]').forEach(function(checkbox) {
        if (checkbox.labels && checkbox.labels[0].innerText.includes("Temperature Sensor")) {
            checkbox.checked = true;
        }
    });
    Explanation:
    querySelectorAll('input[type="checkbox"]'): Selects all checkboxes.
    checkbox.labels[0].innerText.includes("Temperature Sensor"): Checks if the label contains the text "Temperature Sensor".
    checkbox.checked = true: Checks the checkbox.
    Alternative
    If the checkboxes don’t have labels, but instead have a name, id, or class attribute that includes "TemperatureSensor", you can modify the selector:
    document.querySelectorAll('input[type="checkbox"][name*="TemperatureSensor"]').forEach(cb => cb.checked = true);

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 639

#2
Valantis Profile Picture

Valantis 392

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard