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 / Excel Set checkbox sta...
Power Automate
Unanswered

Excel Set checkbox state fails

(0) ShareShare
ReportReport
Posted on by 9

I'm using the Set checkbox state in window action and want to set it to Unchecked. The initial state is unknown, it may be checked or unchecked. When I use the action, it does not uncheck it if it is in a checked state. There is no error.

Specifically I'm using the Subtotal function from Outline. I want to check the Stock checkbox and uncheck the Sector checkbox. This is how the dialog box opens most of the time. The check/uncheck isn't working. Any thoughts? Thanks!

PAD_Charles_0-1635468740447.png

 

  • VJR Profile Picture
    7,635 on at

    Hi @PAD_Charles 

     

    This may definitely have to got to do with the selectors.

    For a windows application this should work without any issues, unless the selectors are incorrect. Can you share what your selectors show for the checkboxes.

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    Hmmm can't get it to work either.
    Tried with the "Set checkbox state" and it only highlights the checkbox text.
    But I can click it by using "Click UI element in window", if I ask it to click left, with X offset at 10.
    If I don't use an offset of 10 then it will click just left of the checkbox.

    My selector

    The selector below is made short by me, have tried with the one that PAD catches, and same result.

    Highboy_0-1635499200795.png


    My click action

    Highboy_1-1635499253709.png

     

     

  • PAD_Charles Profile Picture
    9 on at

    Hi, thanks for trying to help. Is this what you're looking for?

    > window[Class="bosa_sdm_XL9"][Name="Subtotal"] > list[Name="Add subtotal to:"] > checkbox[Name="Sector"]

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    I don't think it's a selector problem.
    Btw.: You can make your selector as short as this 
    checkbox[Name="Sector"]

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    I've previously experienced that the subwindows in Excel work inconsistently when activated with the regular actions.

    What you might need to do, is check whether or not the checkbox is checked, and if we have to click on it, use the following code:

    UIAutomation.GetElementDetails Element: appmask['Window \'Create Sparklines\'']['Button \'OK\''] AttributeName: $'''Location and Size''' AttributeValue=> AttributeValue
    Text.SplitText.SplitWithDelimiter Text: AttributeValue CustomDelimiter: $''', ''' IsRegEx: False Result=> TextList
    Variables.TruncateNumber.RoundNumber Number: TextList[2] / 2 + TextList[0] DecimalPlaces: 0 Result=> X
    Variables.TruncateNumber.RoundNumber Number: TextList[1] + TextList[3] / 2 DecimalPlaces: 0 Result=> Y
    MouseAndKeyboard.SendMouseClick.ClickAt ClickType: MouseAndKeyboard.MouseClickType.LeftClick MillisecondsDelay: 0 X: X Y: Y RelativeTo: MouseAndKeyboard.PositionRelativeTo.Screen MovementStyle: MouseAndKeyboard.MovementStyle.Instant
  • PAD_Charles Profile Picture
    9 on at

    Thanks for posting this. I don't know how to add code to Power Automate Desktop, but this gave me the idea to check the state of each checkbox and "check" it if needed.

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

#2
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard