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 / Reset button not worki...
Power Apps
Unanswered

Reset button not working when user re-enters the form to edit the same record

(0) ShareShare
ReportReport
Posted on by 312

I have a combo box that is disabled after three choices with a reset button using Reset(cmbJEASeason) if the user wants to change their selection. It works perfectly when the user enters the form and if they save the form and navigate back to it within a session, but if they start a new session editing the same record, the reset button doesn't work. I am stumped as the choices selected previously do show up in the combo box. Any insight/ solutions welcome! Thanks in advance! 

Categories:
I have the same question (0)
  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @KBeale 

     

    Resetting controls within a form can only be done by controls that are added in inside the form. I hope it makes sense to you. You can add a reset button inside that Datacard like this:

    cha_cha_0-1685261194732.png

     

    Then you can add the code to that button:

    cha_cha_0-1685261602507.png

     

     

     

     

  • KBeale Profile Picture
    312 on at

    Oh, I should have mentioned, the reset control is in the same card as the combo box. 

  • cha_cha Profile Picture
    4,932 Moderator on at

    Can you please share the DefaultSelectedItems of your ComboBox?

     

    Also, if it says "Parent.Default", please share the Card's Default property

  • KBeale Profile Picture
    312 on at

    It does say "Parent.Default" The default for the card is "ThisItem.'JP A Choose Seasoning'". I need the box to reflect the items that have been previously selected, unless the user hits reset (exactly how it is working until they leave the form and begin a new session) Thank you! 

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @KBeale 

     

    Based on your requirement, this is how I would do it. This is not a standard way. 

     

    I would use a variable to control the default value of the Combobox. I will name the variable varResetCombo

     

    On your Form's OnSuccess,  add a code that will set the varResetCombo variable:

    Set(varResetCombo,false);

     

    On the default for the card, instead of just "ThisItem.'JP A Choose Seasoning'", use this

    If(varResetCombo,ThisItem.'JP A Choose Seasoning',Form1.LastSubmit.'JP A Choose Seasoning')

     

    Then on the ResetButton's OnSelect:

    Set(varResetCombo,true);

     

    In every other part of your app, above code Set(varResetCombo,true); if you want to ensure that the comboBox to be reset.

  • KBeale Profile Picture
    312 on at

    Thank you! I will try this! But I am confused, what does the last sentence mean? "In every other part of your app, above code Set(varResetCombo,true); if you want to ensure that the comboBox to be reset." Thanks again!

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hi @KBeale 

     

    An example of this is when you change the mode of your form to View mode. When you do that, you would want to ensure that when it's in view mode the value of varResetCombo is true because you want to see the data for that item instead of the Last values selected.

     

    It would also be best to have the code added to App.OnStart so that the first time they access the form when they open the app, it shows blank value.

     

    The code i meant in this response is the  Set(varResetCombo,true);

  • KBeale Profile Picture
    312 on at

    Thank you for explaining, but I’m a little bit scared to do this because my app needs multiple users to be able to go in and edit their own records and return to them and edit at any time. Could using last submit be problematic given that this is how the app will be used? Thank you! 

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @KBeale 

     

    The LastSubmit only takes the last submitted record of the current app user on the current device. If there are concurrent usages from different users and on different devices, it should not be a problem.

  • KBeale Profile Picture
    312 on at

    I tried this, but now the reset button doesn't work when they have initially entered 3 choices (and not started a new session) 😞 

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,033

#2
Valantis Profile Picture

Valantis 632

#3
11manish Profile Picture

11manish 607

Last 30 days Overall leaderboard