cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
isogunro
Regular Visitor

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.

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.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,371)