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
Super User II
Super User II

Can you add Reset(Dropdown) to the OnSelect of your Back or Cancel button?

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

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Also, do you have any values in the OnSuccess of EditSetupNotesPage form?

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

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

That didn't work.

OnSuccess = false

Is the dropdown a control within your gallery?

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

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

I'm self taught...  I'm not sure what you mean by within my Gallery.  I kinda took over this app from a consultant we had that originally built it.

No problem at all, I am glad you are picking it up!

Can you try Reset(GalleryName) in the OnSelect of your Cancel button? In this and the previous Reset that I had suggested replace the control names within the Reset function with your control names.

Let me know if this helps.

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

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

I'm dumb, lol.   What's the Gallery name?

The first screen is Customer list, and CustomerListPage.   That's where the Dropdown is.

 

This is what I have in the OnSelect for the Cancel button right now.  It still keeps what I had before.

 

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

Actually, I might be one 🙂

Can you do one thing? Can you share the left side pane that shows the list of controls? That will help me immensely.

---
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.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (32,167)