Skip to main content

Notifications

Community site session details

Community site session details

Session Id : N65/EA5FaMk7k4FVIKTdS5
Power Apps - Building Power Apps
Unanswered

Reset when Yes/No check box properties on a data card power apps

Like (0) ShareShare
ReportReport
Posted on 20 Dec 2023 03:52:38 by 431

Hello Power Users,

 

I was building a canvas app with input data as Yes/No check boxes for multiple data cards with visibility rules. Will reset the next data cards if current check box is unchecked. Also, set the Yes/No check boxes in such a way that they toggle between them. Like if Yes is checked and clicked on No check box, that will uncheck Yes and check No, vice versa.

On App Start : Set(variable1,0). (1-Yes, 2-No and 0- not selected)

On each "Yes" check box property : OnCheck :  Set(Variable1, 1)

                                                         OnUncheck:  Set(Variable1,0);Set(Variable2,0)......... so on for all the next data cards

On each "No" check box property : OnCheck :  Set(Variable1, 2)

                                                         OnUncheck:  Set(Variable1,0);Set(Variable2,0)......... so on for all the next data cards

 

There are some conditions/operations set on uncheck of each check box. But in case of toggling that action is not performed. For example out of Yes/No check boxes, lets assume Yes is checked. When clicked on No it will select No check box and unchecks Yes check box. Here the Yes check box is not unchecked, just toggled between those 2 check boxes.

 

Would like to get those unchecked logics to run without unchecking them.

 

Hope I made clear on the issue that I'm looking for help.

 

Can anyone please help! Thank you so much in advance!

 

 

 

Categories:
  • AARON_C Profile Picture
    2,233 Most Valuable Professional on 20 Dec 2023 at 04:31:02
    Re: Reset when Yes/No check box properties on a data card power apps

    Hi @KrishR 

     

    To get the toggle like functionality, you would need to change the logic in the OnCheck and OnUncheck properties:

     

    For "Yes" checkbox:

    OnCheck:

    Set(Variable1,1);
    Set(Variable2,0);

     

    OnUncheck:

    Set(Variable1,0);

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard
Loading started