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

Number of lines in a gallery depends on a variable

Dear friends,

 

I'm fighting with a gallery.

 

On my forms i got a Slider which its value is between 0 and 24 both includes. Then i have a gallery where i want to have the same number of row as my slider value.

 

My slider value is stocked in a var "dataValue" and my gallery items function is  : "FirstN(CustomGallerySample;dataValue)" 

 

On this photo you can see that there is 3 row because the value of the slider is 3

But on this one, you can see that my gallery is composed of only 4 rows and that i can have more. In gallery option, scroll bar is activated so i don't know what can I do.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User II
Dual Super User II

Hi @LAzerty1 

 

Please update the OnChange property of your slider to:
 
ClearCollect(GalleryRowCount,FirstN([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],Slider1.Value))
 
Now in the Gallery, please modify the Items property to GalleryRowCount. 
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Dual Super User II
Dual Super User II

Hi @LAzerty1 

 

Please update the OnChange property of your slider to:
 
ClearCollect(GalleryRowCount,FirstN([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],Slider1.Value))
 
Now in the Gallery, please modify the Items property to GalleryRowCount. 
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Thanks a lot ! It works perfect ! @yashag2255 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,194)