cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Future_Vision
Responsive Resident
Responsive Resident

How do you get a record to scroll in a gallery?

I have two galleries on a screen. One is the list of all of the records and the second gallery is the details of the chosen record. In my scenario the detail gallery contains all of the columns of the record. Unfortunately, when arranged, the data from all of the columns in the record do not fit within the height of the gallery. I need to be able to get the record to scroll to see all of this data. I thought this would be easy if you had 'Show scrollbar" turned on but that doesn't seem to do anything. How do I ensure that the scrollbar shows if the gallery record exceeds the size of the gallery. Make sense?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Drrickryp
Super User II
Super User II

@Future_Vision

You are trying to make a gallery do the role of a display form. Put one on the screen and make the datasource the same as the gallery and make the item property Gallery.Selected. You should be able to adjust the form’s properties to display your data.

View solution in original post

Future_Vision
Responsive Resident
Responsive Resident

@Drrickryp 
Hmm. Ok. I need to use the main gallery(that shows all of the records) with the button that sets glbFormData to the selected record. Forget the form completely. It's just for show. See any issues with this approach?

View solution in original post

8 REPLIES 8
Drrickryp
Super User II
Super User II

@Future_Vision

You are trying to make a gallery do the role of a display form. Put one on the screen and make the datasource the same as the gallery and make the item property Gallery.Selected. You should be able to adjust the form’s properties to display your data.

View solution in original post

Thanks. Question though. Is there a way to set a global variable to the view form? I was setting a 'copy' button like this.

 

Set(glbFormData, Highlight_GAL.Selected);
Navigate('Tracking')

 

Or if the button was inside of the gallery I'd use:

Set(glbFormData, ThisItem)
Drrickryp
Super User II
Super User II

@Future_Vision 

That should work if you set the item property of the form to glbFormData.  If the form doesn't populate with that then set the Item property to Lookup(yourdatasource,ID=glbFormData.ID)

My problem is that I can't set glbFormData to Highlight_GAL.Selected or ThisItem with that copy button. I throws an error.

 

"Incompatible type. We can't evaluate your formula because the context variable types are incompatible with the types of values in other places in your app"

 

I'm not sure how to add a button inside of the form. It won't allow me. I'd have to add it to datacard

Drrickryp
Super User II
Super User II

@Future_Vision 

I believe that error indicates that you are using Set() and UpdateContext({}) in creating the same variable in different parts of your app. You can either use Set() or UpdateContext() in creating a variable but not both.  You may be creating a context variable in a Navigate() function so you will need to check those too. 

Future_Vision
Responsive Resident
Responsive Resident

Hmm. Don' think that is the issue. I was able to use that code when it was a gallery I was copying. I don't have an option to use ThisItem or Selected when it is a form.

Future_Vision
Responsive Resident
Responsive Resident

@Drrickryp 
Hmm. Ok. I need to use the main gallery(that shows all of the records) with the button that sets glbFormData to the selected record. Forget the form completely. It's just for show. See any issues with this approach?

View solution in original post

Drrickryp
Super User II
Super User II

@Future_Vision 

Nope.  Sounds good to me. 

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 (59,557)