cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
isogunro
New Member

Hidden box on clicking checkbox

Hello,

 

I am brand new to PowerApps and I'm having a few issues.

 

I have 3 checkboxes and a corresponding multi-line boxes for each check box.

 

The 3 checkboxes are next to each other at the top of the page.  The boxes are below the 3 text boxes stacked on top of each other with about 5 pixels between each box.

 

When a checkbox is clicked, the multi-line becomes hidden.  That works fine but it also leaves a big space.  I would like the space to be removed whenever a box is hidden.

 

How can I achieve this with PowerApps?  I tried using a container but it didn't work.

 

Any help would be much appreciated.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @isogunro ,

 

Would you like to hide controls based on the conditions of check boxes?

 

If so, I made a demo below for your reference, assuming the Check Boxes names CheckBox1/2/3, Text Boxes name TextInput1/2/3:

hidetextbox.gif

 

On your end, you will need to:

1\ record all Y-axis value of all text input boxes. In my demo they are 130,200 and 270, so difference of each text box is 70.

 

2\ set Y property of TextInput2 to

200-If(Checkbox1.Value = true, 70)

 

3\ set Y of TextInput3 to:

270-If(Checkbox1.Value = true,70)-If(Checkbox2.Value=true,70)

 

4\ set some other controls below the text boxes to:

350-If(Checkbox1.Value = true,70)-If(Checkbox4.Value=true,70)-If(Checkbox5.Value=true,70)

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @isogunro ,

 

Would you like to hide controls based on the conditions of check boxes?

 

If so, I made a demo below for your reference, assuming the Check Boxes names CheckBox1/2/3, Text Boxes name TextInput1/2/3:

hidetextbox.gif

 

On your end, you will need to:

1\ record all Y-axis value of all text input boxes. In my demo they are 130,200 and 270, so difference of each text box is 70.

 

2\ set Y property of TextInput2 to

200-If(Checkbox1.Value = true, 70)

 

3\ set Y of TextInput3 to:

270-If(Checkbox1.Value = true,70)-If(Checkbox2.Value=true,70)

 

4\ set some other controls below the text boxes to:

350-If(Checkbox1.Value = true,70)-If(Checkbox4.Value=true,70)-If(Checkbox5.Value=true,70)

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,169)