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 / Dropdown Resetting to ...
Power Apps
Answered

Dropdown Resetting to Default Value on Submit

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am looking to save the dropdown selection from a gallery, which has a repeating functionality. Users select either "Positive" (the default selection) or "Negative."When I hit "save," it should update my list with the user inputs. However, when I selected "Negative" and then hit save, it immediately defaults back to "Positive." Any ideas? Thanks! 

engineer28_1-1623083755879.png

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Is there any particular reason that you have an EditForm and are using Patch to submit it rather than SubmitForm?

    You should only be doing a SubmitForm on the form, otherwise you will have unpredictable results as you are seeing.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It is not a form but a gallery functioning as a repeating table of sorts, allowing for multiple imputs that are all connected to a form. (The title, product, etc. you see at the top of the screenshot). 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Thanks for the clarification.  It all looked like a form 😉

     

    So, the above is a form though - is this information to be submitted in the record of the form or are the contents of this Gallery going some place else?

     

    As for the dropdown that you were dealing with - what is the Default property of that control in your gallery?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The contents of the form and gallery go to two separate lists (but are tied together with a MasterID number). The idea is that the user can input multiple comments (via the gallery) for one project (the form). 

     

    As for the dropdown, the default property is "1"

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Well, as for the Default property...there is your issue.  You don't have it set to anything.  It needs to be the underlying record value for it to "retain".

    Set the Default to : ThisItem.ChoicePN.Value

     

    In your OnSuccess of the editform, the following formula:

    Collect(yourOtherDataSourceName,
     AddColumns(Filter(InputCollection, !IsBlank(MultiLineProblem)),
     "yourMasterIDColumnName", Self.LastSubmit.ID
     )
    )

     

    The above formula implies a couple of things:

    1) That all of the items in your gallery (problem, solution, choice) must be completed and you have already accounted for this when adding to the collection - so, the above filter will get rid of any rows that don't have a problem filled in (i.e. your blank row).

    2) That the names of your columns (MultiLineProblem, etc) in your collection match EXACTLY the real names of the columns in your list.

    3) That the ChoicePN column in your list is a text column and not a Choices column

     

    If any of the above implications are not correct, please let me know which and what is different.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Changing the default property did not make a difference. 

    As far as assumptions, assumptions 1&2 are correct but 3 is not. My ChoicesPN column is a Choices column

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Yes, this was why #3 was important.  You are saving the text value of the record to your underlying collection.

    So, If it is a choice, then you need to change the formula you have for the save icon to the following:

    Patch(InputCollection, ThisItem, 
     {MultiLineProblem: inputProblem.Text, 
     MultiLineSolution: inputSolution.Text,
     ChoicePN: Dropdown1.Selected
     }
    );
    Collect(InputCollection, 
     {MultiLineProblem: "", 
     MultiLineSolution: "",
     ChoicePN: {Value:""}
     }
    )

     Default on the dropdown should remain as : ThisItem.ChoicePN.Value

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Unfortunately it is still switching to positive

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Then your underlying collection is not getting updated properly.  Can you look at the collection viewer and see what it is capturing?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    engineer28_0-1623098428061.png

    Is this helpful? This is the "OnSuccess" of the form component 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard