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

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
Power Apps Staff mabolan
Power Apps Staff

Re: Tap icon to scroll data

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
Power Apps Staff tahoon
Power Apps Staff

Re: Tap icon to scroll data

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.

Power Apps Staff mabolan
Power Apps Staff

Re: Tap icon to scroll data

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

CABIRD
Level: Powered On

Re: Tap icon to scroll data

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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,102)