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.

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,294)