cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kenjoy84
Helper II
Helper II

Swipe gesture

I want to adopt a swipe gesture function in my app. In detail screen of the list, when the user swipes right, then the page supposed to transit to the older list.

When the user swipe left, then the page supposed to transit to the newer list.

I found one reference page, but this development explanation is still vague, so I can't reproduce it at my side.

Cold you explain the details of the following way or the other way to realize?

Thank you for your cooperation!

 

(URL)

https://michalguzowski.pl/swipe-approval-in-power-apps/

 

(Explanation in this link)

  • On app start set a variable that we will be using as an iterator
    Set(Iterator,1);
  • In screen OnVisible function load an item in the place equivalent to the iterator value
    Set(DisplayedItem,Last(FirstN(SPOSourceList,Iterator)))
  • Place an item on the screen you want a user to move (ie. an Image1 control). Remember to set Image value to value of proper column of DisplayedItem. (How to set value to image?)
  • Add slider control and put it above of added item in tree view
  • Set the item X value as: (What is item X?)
    (‘Screen1’.Width*Slider1.Value/100)-Image1.Width/2
    Above function counts the position of the item center based on the slider handle value
  • Remember to make slider big enough so a user always hit its handle. In my case I’ve used handle size of 200. Your screen should look and behave like this now:
  • Now in slider OnChange place below function. The function make action once a slider handle will be placed on the left or right side of the screen. In my case I’m Navigating user to screen AND do Patch function to update data source.
  • On both screens (Accepted and Rejected) I have invisible timers that after (OnTimerEnd property) 1 second (1000 ms) run following function
1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Kenjoy84 

The blog author is in the best position to answer your question.  Why not try the comments section on Michael's blog?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

1 REPLY 1
mdevaney
Super User
Super User

@Kenjoy84 

The blog author is in the best position to answer your question.  Why not try the comments section on Michael's blog?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,251)