cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RTW
Level 8

Conditional Auto Height

Hi folks.

 

In my current PowerApp I have an Html Text Box that interprests a snippet of CSV data and render an HTML table. What I would like to do is have it so that, as much as possible, a scroll bar does not render. Initially I had it set to simply auto height which worked to an extent but if there was a large amount of data it would take up too much space on the app.

 

What I've done is I've created and hidden a copy of this HTML text box that is the same width and contains the same information. I have hidden this from the user and set the height to auto-height. On my main text box I set the Height property to Min(HiddenText.Height, 450)

This behaves as expected but is a little... clunky. Is there a property or setting I'm missing? Thanks in advance!

3 REPLIES 3
WillPage
Level 8

Re: Conditional Auto Height

AutoHeight is a boolean input, so you can use that to evaluate the length of the string in the Text property, or the number of rows of your CSV data, e.g. Length(HtmlText1.Text) > 200 or if your CSV data is in a collection, CountRows(col_CSV_Data) > 20 or whatever. Set the Height property statically to the maximum you want it to be.

RTW
Level 8

Re: Conditional Auto Height

@WillPage , I just want to make sure I'm getting this correctly. I'd figure out in what length amount of data I would need to get to my maximum desired height, and create a logical statement that turns auto height off if it is greater than that, or on if it is less than that?

WillPage
Level 8

Re: Conditional Auto Height

Yeah that's exactly what I was thinking. You'll obviously need to experiment. If it's always an HTML table going in there and the cell height is fixed it should be predicable by counting the rows of the collection or data source that's going into the table.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,245)