Create a Scrollable Screen for Custom Power Apps Layouts
Use vertical containers to build a custom scrollable screen for any app scenario.
When you need to display a form, a dashboard, or any custom screen that contains more content than the visible area, you have to create your own scrollable region. Power Apps galleries and edit forms handle this automatically, but for bespoke layouts a vertical container gives you full control. By simply toggling one property, you can turn an ordinary container into a smooth‑scrolling pane.
This article walks through building an Employee Training Course Catalog—a real‑world scenario where you have variable‑length descriptions, a dynamic list of topics, and multiple data fields. You’ll see how to:
- Prepare a SharePoint list as the data source.
- Add a vertical container and enable scrolling.
- Use auto‑height labels and galleries that adapt to their content.
- Reset the scroll position when the user moves between records.
The same technique works for any app that needs a scrollable layout—project trackers, help desks, inventory views, etc.
Example Scenario: Training Course Catalog
Your HR team maintains a SharePoint list called Training Courses with the following columns:
| Column | Type | Notes |
|---|---|---|
| Title | Single line of text | Course name |
| Description | Multiple lines of text | Often several paragraphs |
| StartDate | Date | e.g., 2026‑01‑15 |
| DurationHours | Number | How many hours the course lasts |
| Topics | Choice (allow multiple selections) | Options: Power Apps, Power Automate, Power BI, SharePoint |
The app will let a user pick a course from a dropdown and then view its full details inside a scrollable area. Because the description can be long and the number of topics can vary between one and four, the scrollable region must adapt dynamically.
Step 1: Create the SharePoint List
- Go to SharePoint and create a new list named Training Courses.
- Add the columns shown above. For Topics, open the column settings, select “Choice”, enter the four options, and enable Allow multiple selections.
- Insert a few test rows. Make the descriptions different lengths (from a short sentence to three paragraphs) to verify that the auto‑height labels work correctly.
Step 2: Build the Screen with a Vertical Container
-
Open Power Apps Studio and create a new tablet app from blank.
-
Rename the default screen to
CourseCatalog. -
Insert a Label at the top and set its
Textto "Training Course Catalog"—this will serve as the header. -
From the Insert pane, search for Vertical container and drop it onto the screen.
-
Resize the container so it fills the canvas under the header, leaving a small margin at the bottom.
-
With the container selected, go to the right‑hand properties panel, find VerticalOverflow, and change it from “Hidden” to Scroll.
In Power Fx you can also set it programmatically:
powerfxVertical container overflow settingVerticalOverflow = VerticalOverflow.Scroll
Now any controls placed inside the container that extend beyond its bounds will cause a scrollbar to appear.
Step 3: Add Controls Inside the Container
Select the Current Course
Add a Text input or a Dropdown above the container (still inside the header area) to let the user choose which course to display. For this example we’ll use a Dropdown.
-
Insert a Dropdown control next to the header.
-
Set its
Itemsproperty to the SharePoint list:powerfxDropdown itemsItems = 'Training Courses'
-
In the container, add a Label for the course title and set its
Textto:powerfxCourse title labelText = LookUp('Training Courses', ID = Dropdown1.Selected.ID, Title) -
Add labels for DurationHours and StartDate. Their
Textproperties follow the same pattern. For example:powerfxDuration labelText = "Hours: " & LookUp('Training Courses', ID = Dropdown1.Selected.ID, DurationHours)powerfxStart date labelText = "Starts: " & Text(LookUp('Training Courses', ID = Dropdown1.Selected.ID, StartDate), "mm/dd/yyyy")
Auto‑Height Description Label
Instead of guessing a fixed height for the description, set it to grow automatically.
-
Insert a new label inside the container and call it
lblDescription. -
Set its
Textproperty:powerfxDescription textText = LookUp('Training Courses', ID = Dropdown1.Selected.ID, Description) -
Under
Properties, set AutoHeight to true.
Now the label will expand to show the full description, and the container will grow the scrollable area accordingly. If the description is short, the label takes up only the needed space; if it’s long, the scrollbar appears.
Auto‑Height Gallery for Topics
Because the Topics column can hold between one and four selections, we need a gallery that shrinks or grows to fit exactly.
-
Insert a Label above the gallery with
Text= "Topics". -
Insert a Vertical gallery inside the container.
-
Set the gallery’s
Itemsproperty:powerfxGallery itemsItems = LookUp('Training Courses', ID = Dropdown1.Selected.ID, Topics)When a multi‑select choice column is used as a table, each selected value becomes a row with a
Valuefield. -
Inside the gallery, insert a label and set its
TexttoThisItem.Value. -
Style the gallery: set its
FilltoRGBA(237, 237, 237, 1)and the label’sFilltoWhiteto create a clean table appearance. -
Now set the gallery’s
Heightproperty to automatically calculate the correct height based on the number of rows:powerfxDynamic gallery heightWith( {numRows: CountRows(LookUp('Training Courses', ID = Dropdown1.Selected.ID, Topics))}, TemplateHeight * numRows + TemplatePadding * (numRows - 1) )Replace
TemplateHeightandTemplatePaddingwith the values you set on the gallery’s properties (e.g., 52 and 5). The formula multiplies the row count by the template height and adds the top margin for the first row plus padding between rows.
Step 4: Reset the Scrollbar When Navigating Between Courses
When a user selects a different course from the dropdown, the content updates but the scrollbar might stay in its previous position. To force the scrollable container to jump back to the top, use a quick UI trick.
-
Insert a Timer control somewhere outside the container (e.g., behind the header). Set its
Durationto1(millisecond) andAutoStartto false. -
Add a small invisible Label inside the container (you can set its
Visibleproperty tofalseinitially). This label will be toggled by the timer to cause a reflow. -
Set the dropdown’s
OnChangeto start the timer:powerfxDropdown onChangeTimer1.Start()
-
Set the timer’s
OnTimerEndto briefly make the hidden label visible and then hide it again:powerfxTimer OnTimerEndUpdateContext({ctxToggle: true}); UpdateContext({ctxToggle: false})Then bind the hidden label’s
Visibleproperty toctxToggle. Because the label exists inside the container, flipping its visibility causes the container to recalculate its scroll position, effectively resetting it to the top.This approach is safe, fast, and doesn’t require complex formulas.
Pro TipYou can also combine this with a variable that resets other UX elements. The key is to change a property of a control inside the container so that the container re‑renders its scroll state.
Performance & Delegation Notes
-
LookUpwith the ID column is a delegable operation, so it works well even with large SharePoint lists. -
If your list contains several thousand courses, consider limiting the dropdown’s items with a
Filterto avoid loading everything. For example, show only active courses:powerfxFilter dropdown itemsItems = Filter('Training Courses', Status = "Active") -
The dynamic gallery height formula triggers a recalculation whenever the selected course changes. Because it uses
CountRowson the sameLookUp, it may cause an extra data request. For small lists this is not an issue, but for high‑volume scenarios you could store the topic list in a variable once. -
Avoid placing heavy expressions (e.g., complex
LookUpinsideCountRows) in theHeightproperty if performance becomes a concern. Benchmark with realistic data.
Common Mistakes and Troubleshooting
| Problem | Likely Cause | Solution |
|---|---|---|
| No scrollbar appears even though content is cut off | The container’s VerticalOverflow is still set to Hidden | Change it to Scroll (check the right‑pane or set VerticalOverflow = VerticalOverflow.Scroll) |
| Description label is cut off or overflows | AutoHeight is false | Set AutoHeight = true on the label |
| Gallery height is too small (second row hidden) or too big (whitespace) | Height formula is missing or uses fixed pixels | Apply the dynamic formula with CountRows |
| Dropdown shows only one item at a time | The dropdown is bound to a single‑value column instead of the whole list | Set Items = 'Training Courses' (the entire table) |
| Scrollbar resets incorrectly when switching courses | The container did not re‑render | Use the timer/label toggle method described above |
Final Recommendation
The vertical container with scroll overflow is the leanest way to build a custom scrollable screen in Power Apps. It works for forms, dashboards, and any layout where the content length is unpredictable. Combine it with auto‑height labels and calculated gallery dimensions to create an interface that adjusts automatically to your data.
Start with a simple prototype—insert a container, add a few controls, and toggle VerticalOverflow—and you’ll see how fast you can replace a complex workaround with a clean, responsive solution.
References
- Matthew Devaney, Easy Power Apps Scrollable Screen Using A Vertical Container (original inspiration): https://www.matthewdevaney.com/easy-power-apps-scrollable-screen-using-a-vertical-container/
- Microsoft Learn – Understand containers in Power Apps: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/add-containers
Learn how small coding practices—like using descriptive names, flattening conditions, and simplifying logic—can make your apps easier to update and less error-prone.
Move past the gallery and discover the hidden patterns for validation, navigation, and smart submission handling in your data entry forms.
PowerShell unlocks admin capabilities that the Power Platform admin center simply doesn’t offer—from recovering deleted apps to blocking trial licenses. Here’s how to wield them safely.