cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LAzerty1
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
yashag2255
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
yashag2255
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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,537)