cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Yoursnani
Post Patron
Post Patron

Variable creating for check box

Hi 

Am trying to create variable for check box's . 

 

I have 10 check box's . I am trying to create variable if there is non checked check box set that is "true", if any one checked variable set to be "false"

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@Yoursnani 

Have the check property of all the checkboxes Set(var,true) and the uncheck property of each checkbox 

If(
    Checkbox1.Value = false && Checkbox2.Value = false && Checkbox3.Value = false, ...
    Set(
        var,
        false
    ),
    Set(
        var,
        true
    )
)

 and in the OnVisible property of the screen Set(var,false).

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

@Yoursnani 

Have the check property of all the checkboxes Set(var,true) and the uncheck property of each checkbox 

If(
    Checkbox1.Value = false && Checkbox2.Value = false && Checkbox3.Value = false, ...
    Set(
        var,
        false
    ),
    Set(
        var,
        true
    )
)

 and in the OnVisible property of the screen Set(var,false).

Equivalent to what was in drrickryp's code:

Set(NoChecks, !Checkbox1.Value && !Checkbox2.Value && !Checkbox3.Value ...)

...and you could just put that in the Select property of each control, leaving the Checked and Unchecked properties blank.


 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,137)