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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / On exit, change drop d...
Power Apps
Suggested Answer

On exit, change drop down values back to default record item

(1) ShareShare
ReportReport
Posted on by 48
Hi, 

I have a form that that has drop downs of shift start and end times. I have a tab list that when the user selects an option from the tab list it updates the drop down box values to preset times.
What happens though is that if the user selects an options but doesn't save the record, the drop down pre defined value stays when the user exits the form and goes back in to edit it
The defaults property of the first Start hour is 
Switch(
    true,
    "Reset" in TabList4_1.SelectedItems, "00",
    "Day" in TabList4_1.SelectedItems, "07",
    "Evening" in TabList4_1.SelectedItems, "14",
    "Night" in TabList4_1.SelectedItems, "22",
    Hour(EditRecord.ShiftEndDateTime)
)

Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,362 Super User 2025 Season 2 on at
    Hi,
     
    I am sorry, I am not quite following.
     
    They come in.
    They click the Tab Thingee
    The drop downs get set to XYZ by the Switch
     
    But they don't save but they exit the form/screen???
     
    and you want it to reset to the Default???
     
    If that's the case, then it depends on what you are doing, but, you have to Reset the Tab stuff so that its not longer has a selection.
     
    I cannot see the Tab list you are referring too, but you want to reset it so that it goes back to its default (blank maybe??)
     
    I would use the OnVisible property to reset these things.
    1. You can create a Context or Global Variable, let's call it ShouldIReset
    2. Put that Variable (which needs to be a boolean) in ALL the controls you want to reset on this screen/form
    3. In the OnVisible do this
     
    Set(ShouldIReset,true);
    Set(ShouldIReset,false);
     
    This will force any control you want to reset... and then it won't have what they selected before in it.
     
    If I understood your need.
     
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard