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

Resetting a drop down list when returning to the page

My initial screen is a list screen.  One of the fields is a drop down list.  This drop down list is where the user will select which page to go to.  It starts with Select (which takes you nowhere).

 

When the user picks an option and hits save on that screen, it returns to the initial screen and the drop down list resets to have Select showing.  If the user hits cancel on that screen, it does NOT reset the drop down list to Select.

 

Here is the OnSelect for the Save.

// Shows overlay on save
UpdateContext({OverlayVisible: true});

If(SubmitForm(EditSetupNotesPage),
Refresh(CustomerMaster_v3);
Navigate(CustomerList, ScreenTransition.Fade),

// hides overlay on error
UpdateContext({OverlayVisible: false}))

 

Here's the OnSelect for the Cancel:

Refresh(CustomerMaster_v3); Back(ScreenTransition.Fade)

 

What do I need to do to get the dropdown to reset?  I am attaching a screenshot that shows you how it returns back when I hit cancel.

 

 
29 REPLIES 29

image.png

image.png

image.png

Try out a couple of things for me:

Add the following to the OnSelect property of the Cancel button
1. Reset(CustomerListPage)
2. Reset(clScreenSelectDDL)

Let me know if either of them work.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com

Refresh(CustomerMaster_v3); Reset(CustomerListPage); Navigate(CustomerList, Fade)

 

This did not work.

 

Refresh(CustomerMaster_v3); Reset(clScreenSelectDDL); Navigate(CustomerList, Fade)

 

This did not work.

 

Apologies for the series of questions. Two more (for now):

1. What is the OnVisible property of the CustomerList screen?
2. Can you set the OnSelect property of the Cancel button to Refresh(CustomerMaster_v3);
Navigate(CustomerList, ScreenTransition.Fade)?

Let me know the outcome of both points.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com

OnVisible doesn't have anything.

 

When I make OnSelect Refresh(CustomerMaster_v3);Navigate(CustomerList, ScreenTransition.Fade) is still didn't work.

Make your OnSelect property of the Cancel button exactly the same as the OnSelect property of the Save button. I just want to make sure that it works at least in this case.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com

It works when I have it exactly like the save.

Did you have this entire thing in the OnSelect of the cancel button in your previous test or just a part of it?

// Shows overlay on save
UpdateContext({OverlayVisible: true});

If(SubmitForm(EditSetupNotesPage),
Refresh(CustomerMaster_v3);
Navigate(CustomerList, ScreenTransition.Fade),

// hides overlay on error
UpdateContext({OverlayVisible: false}))

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com

I had it exactly like the OnSelect for the Save.  

 

// Shows overlay on save
UpdateContext({OverlayVisible: true});

If(SubmitForm(EditSetupNotesPage),
Refresh(CustomerMaster_v3);
Navigate(CustomerList, ScreenTransition.Fade),

// hides overlay on error
UpdateContext({OverlayVisible: false}))

One more thing: Add a label to the screen and set its text property to SubmitForm(EditSetupNotesPage) and hit the Save button. Let me know the value of the label then.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (91,365)