
Announcements
I am experiencing a bug similar to what was dicussed here: https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Potential-Bugs-AutoHeight/m-p/18358#M7999
In the case of an infinite scrolling canvas where I have added several data cards and one of those data cards contains a custom form where at least one of the data cards on that form contains a label control with autoheight turned on. Anytime the content within that autoheight control changes AFTER the screen loads, resulting in the height of that label changing, the height of the form that contains it will not update (i.e. if the autoheight control gets bigger, I end up having to scroll on the form within the data card on the canvas; or if the autoheight control gets shorter, then I end up with extra whitespace at the bottom of the form). Doing something that results in the form "rerendering" such as clicking a button that cycles the form from Not Visible then back to Visible, or leaving the screen and returning to it, then causes the form height to properly update and be the proper height.
As a partial workaround I can use a variable tied to the onchange event of a combobox control that affects what is displayed in the label (it didn't work when I tried to just use the OnChange event of the autoheight Label itself) and the visible property of the form control like this:
Screen1.OnVisible = Set(ResetForm, false); Set(ResetForm, true)
ComboBox1.OnChange = Set(ResetForm, false);Set(ResetForm, true)
Form1.Visible = ResetForm
But this only works when that control is changed AFTER the screen/form initially loads. If I were to view a record where that label contains enough text to make it 3 lines tall, then return to a gallery screen and select a record where the label only needs to be 1 line tall, the label's autoheight doesn't kick in until after the screen has loaded (and the OnVisible property of the screen has already run), so I end up with a Form with a height that is too short to view it without scrolling (at least until I change something on it and my previous workaround causes the visibility of it to cycle). I realize I could use a timer control that does this a second or two after the screen loads, but that is going to look glitchy to the user. Any better workarounds? Any plans to get this bug fixed?
Hi @csteig1230 ,
Do you add a Scrollable screen within your app?
Firstly, I agree with the alternative solution you mentioned above. Based on the issue that you mentioned, it seems an known issue with the AutoHight property of the Label control. As an alternative solution, please consider take a try with the following workaround:
Set the OnHidden property of the Detail screen (Screen1) to following:
Set(ResetForm, false);Set(ResetForm, true)
When you leave tlhe Detail screen (contains the Form), reset the form.
Also please consider take a try to turn off the "Improved app rendering (final validation)" option within Advanced settings of App settings of your app, then try above solution, check if the issue is solved.
Best regards,