cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SCabrera98
Frequent Visitor

Scroll bar in a Gallery with 1 record

Hello, 

 

We have a form to edit our data, which has 50 fields, and within the form there is a scroll bar which means that we can show those 50 fields without a problem.

 

Now, I want to change the editing to do it with flows and with a Gallery (format and other reasons), I'd use a ClearCollect to retrieve the row and use a Gallery to modify it. The issue is in the size, in the Gallery I don't find a way to exceed the page size limit and keep adding fields below that I would reach with a scroll bar, this functionality is liked by its users so I'd like to retain it. I could use some buttons to hide and show some fields so that they can edit the 50, but I'd lose having them all visible at all times and reachable with a scroll bar. 

 

Is there any workaround?

 

TIA

1 ACCEPTED SOLUTION

Accepted Solutions

Here is a slightly modified approach: 

 

  1. Create a collection of 50 records, it could literally just be [1, 2, 3, ....50]
  2. Add all controls that you need for all of your fields to the gallery
  3. Modify your collection or directly in your gallery, set the visibility of the controls based on which control you want in which row e.g. in row 1, you might only want a text input control, row 2 a date picker and so on. Each row will also have a label for denoting what the control is for
  4. Add this gallery to a canvas/scrollable screen
  5. Set the height of the gallery to Self.TemplateHeight*CountRows(Gallery), in other words, 50 multiplied by whatever template height you want
  6. Next, set the height of the data card to Gallery.Height

 

Creating that collection might require work, and I can help if needed, but I think this should solve your problem. Let me know what you think. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

View solution in original post

3 REPLIES 3
PowerAddict
Super User II
Super User II

Try this out and let me know if it helps: 

 

  1. Add a scrollable screen
  2. In the data card, add your gallery
  3. Keep adding controls to the gallery (I believe 50 in your case)
  4. You can keep increasing the height of the data card, even beyond the screen
  5. Set the height & template height of the gallery to DataCard.Height
  6. Since there will only be one row in the gallery, you can set the height of the data card to Gallery.TemplateHeight
  7. This way you will have a scrollable screen with a scrollbar
  8. Also, since the gallery template height will be the same as the height of the data card, you will not have a scrollbar for the gallery itself. Two scrollbars can be bad because when the user scrolls, depending on the current state of the screen, it might end up being either the gallery or the screen that scrolls. So this will ensure that there is only scrollbar. 

 

I tested it out and it seems to work. Here is a small demo:

Scrollable Gallery.gif

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Hello, it seems like an excellent approach, I like it thank you. Nonetheless, I run into one issue, I seem to meet a limit to my TemplateSize.

 

SCabrera98_0-1597946038008.png

There for example, I have the scrollable screen, the Gallery is the green rectangle which has its height set to the DataCard height. So does its TemplateSize, but even though it is set to the DataCard height, it reaches a limit of that separator. If I try to move a label below it I can't, in the case of that dropdown I had to type in its Y axis so that it went below the Template limit. Did you find any limit for the TemplateSize or am I missing something?

 

TIA

Here is a slightly modified approach: 

 

  1. Create a collection of 50 records, it could literally just be [1, 2, 3, ....50]
  2. Add all controls that you need for all of your fields to the gallery
  3. Modify your collection or directly in your gallery, set the visibility of the controls based on which control you want in which row e.g. in row 1, you might only want a text input control, row 2 a date picker and so on. Each row will also have a label for denoting what the control is for
  4. Add this gallery to a canvas/scrollable screen
  5. Set the height of the gallery to Self.TemplateHeight*CountRows(Gallery), in other words, 50 multiplied by whatever template height you want
  6. Next, set the height of the data card to Gallery.Height

 

Creating that collection might require work, and I can help if needed, but I think this should solve your problem. Let me know what you think. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (70,328)