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
Super User
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!
2 REPLIES 2
Super User
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!
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

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 27 members 4,197 guests
Please welcome our newest community members: