cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CABIRD
Post Patron
Post Patron

Tap icon to scroll data

Hello 

 

Ideally I'd like user to tap the forward or back icon to select floor. Vertical scroll bar does exist. Nevertheless user would prefer icon driven forward or back scroll.  

 

App refers to SharePoint list for user selected floor number.

 

Scroll.jpgFloor.jpg

 

I have spent an hour or two (three) searching for for a solution but failed.

 

My attempt - OnSelect - UpdateContext({newvaluetext: [Label9, Floor,]}) not surprisingly fails. 

 

Thank you. 

1 ACCEPTED SOLUTION

Accepted Solutions
mabolan
Power Apps
Power Apps

It looks like you were on the right path. You'll want to create a variable to track the currently selected item which you will manipulate with the arrows and the gallery.

 

LeftButton.OnSelect = Set(Selected,Selected-1)

RightButton.OnSelect = Set(Selected,Selected+1)

Gallery.OnSelect = Set(Selected,ThisItem.number)

 

Then, to make sure that the gallery responds to the changes, you'll need to set the default value of the gallery to your variable.

 

Gallery.Default = First(Filter(numberOfItems,number = Selected))

 

Now, as you press the arrows, the selected item should change and cause the gallery to scroll left and right.

 

 

I've attached a sample of what I described to help you get started.

View solution in original post

3 REPLIES 3
tahoon
Power Apps
Power Apps

One easy way is to set Gallery.ShowNavigation = true. This creates navigation arrows in the gallery that can be used to scroll the items.

 

If you want a custom button to scroll gallery items, it is possible but difficult.

mabolan
Power Apps
Power Apps

It looks like you were on the right path. You'll want to create a variable to track the currently selected item which you will manipulate with the arrows and the gallery.

 

LeftButton.OnSelect = Set(Selected,Selected-1)

RightButton.OnSelect = Set(Selected,Selected+1)

Gallery.OnSelect = Set(Selected,ThisItem.number)

 

Then, to make sure that the gallery responds to the changes, you'll need to set the default value of the gallery to your variable.

 

Gallery.Default = First(Filter(numberOfItems,number = Selected))

 

Now, as you press the arrows, the selected item should change and cause the gallery to scroll left and right.

 

 

I've attached a sample of what I described to help you get started.

View solution in original post

Hello Mabolan

 

Nice of you to infer I was close.

 

Looking at your solution I was way off the mark. 

 

Thank you.

 

Best wishes

Christopher

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 (2,769)