web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Slider Component setti...
Power Apps
Answered

Slider Component setting to default after sliding

(1) ShareShare
ReportReport
Posted on by 36
I built a slider component that I use as a swipe feature in my app. My starting view is a document. The default value of the slider is 50. If I move the slider to the right, i.e., to 100, the status changes, and a new document is displayed. Now the slider value should jump back to 50, its default value. I don't know how to do this. I already tried using Set, but it doesn't work.





Categories:
I have the same question (0)
  • Suggested answer
    tsa-svd2srv Profile Picture
    204 on at
    It may be as easy as adding Reset in the place (somewhere near or at the end) amongst your code.
    Set(MySliderNumber, SwipeComponent_4.SliderValue);
    If(
       MySliderNumber > 50,
       Patch(
          ApprTable, 
          LookUp(ApprTable,
             Dokumentnummer = ApprTableID), 
             { 'Status (new_status)': 'Status (ApprTable)'.Genehmigt }
          );
          Notify("Patched Accepted"),
       Patch(
          ApprTable, 
          LookUp(
             ApprTable,
             Dokumentnummer = ApprTableID),
             { 'Status (new_status)': 'Status (ApprTable)'.Abgelehnt });
          Notify("Patched Denied")
       );
    
    Refresh(ApprTable);
    
    UpdateContext(
        {
            SelectedIDRecord: LookUp(ListItemswithID, ID = SelectedRecord.ID)
        });
    
    If(IsBlank(SelectedIDRecord),
        Back(),
    //else
        UpdateContext(
            {
                SelectedRecord: LookUp(ApprTable, Dokumentnummer = SelectedIDRecord.Record.Dokumentnummer)
            });
    ResetForm(Form2_1););
    
    Reset(Slider2)
     
  • YoshiIsTesting Profile Picture
    36 on at
     
    thanks for response. I can only access Slider2 within the component, not in the app. Therefore, Refresh doesn't work because refresh doesn't recognize Slider2.



  • Verified answer
    tsa-svd2srv Profile Picture
    204 on at
    Sorry, your right. Try this:
     
    In the Components panel (not Screens) and with the component selected, create a New custom property. I named mine "ResetTrigger". Use the settings in the image below:
     

     
    For the Component (yours: cmp_Swipe), you now have a property called ResetTrigger, set it to 50.
     

     
    Then set its OnReset property to "Reset(Slider2)", (or whatever your slider control's name is in the Component).
     

     
    The Slider control's Default property, I left mine blank.
     

     
    Finally, back on the Screens panel, in my button's OnSelect, set it to Reset("ComponentName". In your case, probably something like, "cmp_Swipe_1"
     
     
    Hopefully you understand you could put that Reset() in a string of functions, Maybe even at the end of your OnChange functions.
     
    Let me know if it works
  • YoshiIsTesting Profile Picture
    36 on at
    @tsa-svd2srv yes :) in this way it works, i dont know why but it works :) 
    thanks a lot

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 545 Most Valuable Professional

#2
Haque Profile Picture

Haque 314

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard