cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
hintbw-abc
Level 8

AutoHeight combined with visibility not working correctly

I'm making some custom navigation in my app and have a text field, description and a separator control (that I copied out of a gallery) as the 3 elements to each navigation option. Some navigation options will be hidden to a user depending on their role. I thought I could make the navigation screen expand or collapse using some relative sizes between the different options, but when I preview it going from a state where the navigation is hidden and autoheight is setting it to a minimal height presumably, to a state where the navigation option is visible, the option becomes visible but the autoheight is set to an incorrect value. It stays in this condition until I select the control in the advanced pane in Power Apps studio, at which point it resizes itself correctly. It seems like autoheight is not getting setting correctly.

 

Capture.PNG

8 REPLIES 8
hpkeong
Level 10

Re: AutoHeight combined with visibility not working correctly

Hi

 

If I look at your example, autohight did work but it was overlapped (behind the second record of the gallery).

Can you please increase the Height of Gallery Template so that it fits?

- Please check and make sure when records are appended, the total autoheight + record above (height) < Gallery Template.

 

Alternatively, you can set the Template Autoheight to be in relative to record total height.

In this case, you got to do some manipulation to ensure all heights changes are compensating each other.

 

Hope this helps.

hpkeong
Steelman70
Level 10

Re: AutoHeight combined with visibility not working correctly

Apologies for butting in, but would it not be easier to Filter the options to show only the relevant ones for the user?  That way they would not appear in the gallery at all and you would not need to use AutoHeight.

But maybe I don't understand the full picture.

hintbw-abc
Level 8

Re: AutoHeight combined with visibility not working correctly

I would love to, but it isn't a real gallery. It is really about navigation and to do a gallery I would have had to maintain an unwieldy collection that has a magic "screen" variable so that the Navigate function would work. It just wasn't worth it to get the filter capability, so I'm just hiding the three elements instead. Using autoheight would have made it possible for me to reference a visibility context variable in fewer properties, but I solved the issue by not using autoheight (bummer!) and plugging a variable check into the height property and set it to 0 when it is not visible.

hintbw-abc
Level 8

Re: AutoHeight combined with visibility not working correctly

The heights are actually relative within the grouped sections (I'm not using a gallery control). The problem seems to lie in that it doesn't calculate what the true height of the text boxes should be. I worked around it for now, but I do think there is a issue with it calculating autoheight properties for elements that have gone from not visible to visible.

Steelman70
Level 10

Re: AutoHeight combined with visibility not working correctly

Good to know, thanks for clarifying

hpkeong
Level 10

Re: AutoHeight combined with visibility not working correctly

Hi

 

Autoheight is useful only useful esp for viewing data.

Setting Y as variable and control the value is much more flexible.

However, in case of the height (Y) is out of viewing screen (more than 768), it's advisable to use manupulate Y-var and Height-var to ensure the gallery is within the viewing screen so that SCROLL of data is able.

(I ever encounter that if Gallery Height is out of screen, you can;t scroll data).

 

Just sharing for reference.

 

Screenshot (186).pngScreenshot (187).pngScreenshot (188).png

hpkeong
Microsoft michowl
Microsoft

Re: AutoHeight combined with visibility not working correctly

I'm having a similar issue. In a single card in a form view, I'll have several text boxes stacked. I have a toggle button to hide/show the textboxes (an expanding carrot type control). The textboxes need to have varying height to accomodate multiline values.

 

When I am editing the app, it looks fine. I can expand/contract and looks correct. When I preview the app, the expand contract resulst in a stack of textboxes looking squished OP's screenshot. I don't tink there really is a good work around for my case. This should be classified as a bug.

Django
Level: Powered On

Re: AutoHeight combined with visibility not working correctly

Any progress on this?

It seems the autoheight is renderd on opening the screen but it should be a valid scenario that a label (for example) will be made visible when the screen is already open... in my scenario this bug shows the label (with a conditional visibility as well as Autoheight on true) only half the height of a normal height

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,488)