cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Hide data cards if multiple checkboxes are unchecked

Hi all,

 

Currently I'm working with an application in which I have a form with additional data cards that show up after a checkbox is ticked. 

For example:

[Employee]                   [Supervisor]              [Manager]

       [x]                                 [ ]                               [x]

[Addtl Employee]                                          [Addtl Manager]

 

Because of the way the forms are I've had to keep the datacard itself visible and only set a visible variable to the Title and Control within the datacard. This is because if I set the Visible on the datacard it would look like this if the same checkboxes are checked. 

 

[Employee]                  [Supervisor]                  [Manager]

       [x]                                 [ ]                                [x]

[Addtl Employee]        [Addtl Manager]

 

My issue now is that whenever all checkboxes are unchecked it leaves a big space in the middle of the form, which isn't the best scenario for the UI of the app we are developing. 

 

So my question is what would be the best method of going about this?

Is there any specific function I can create that would basically say

If(Checkbox1 is blank & Checkbox2 is blank & Checkbox3 is blank, UpdateContext({ShowAdditional: true}), UpdateContext({ShowAdditional: false}))

 

Thanks and let me know if more clarity is needed on my end.

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Hide data cards if multiple checkboxes are unchecked

HI @swan_soup ,

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of each Checkbox (Checkbox1, Checkbox2 and Checkbox3) to following:

If(
   Checkbox1.Value = false && Checkbox2.Value = false && Checkbox3.Value = false,
   UpdateContext({ShowAdditional: true}),
UpdateContext({ShowAdditional: false}) )

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Community Champion
Community Champion

Re: Hide data cards if multiple checkboxes are unchecked

Hi @swan_soup how are you progressing with this? Was the above reply helpful? 

 

Thank you,

 

@TopShelf-MSFT 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,989)