cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hintbw-abc
Kudo Kingpin
Kudo Kingpin

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
Community Champion
Community Champion

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
Power Participant
Power Participant

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.

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.

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.

Good to know, thanks for clarifying

hpkeong
Community Champion
Community Champion

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

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.

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,444)