cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LAzerty1
Level: Powered On

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
Dual Super User

Re: Number of lines in a gallery depends on a variable

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
Dual Super User

Re: Number of lines in a gallery depends on a variable

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

Highlighted
LAzerty1
Level: Powered On

Re: Number of lines in a gallery depends on a variable

Thanks a lot ! It works perfect ! @yashag2255 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors
Users Online
Currently online: 270 members 5,433 guests
Please welcome our newest community members: