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 / ComboBox selections ar...
Power Apps
Answered

ComboBox selections are removed after running Patch

(0) ShareShare
ReportReport
Posted on by 12

I am setting up an app/form where I want the app to submit multiple items in a SP list (one for each service type requested).  I am using a forms/gallery set up with repeating tables where I am using comboboxes in my gallery.  My combobox selections are patched to a collection via a save button which then also runs "Collect" to generate a new line.  The patch and collect formulas I am using looks like:

  • Patch(ScopeCollection, ThisItem, {Scope: ScopeBox.Selected.Results, Subcat: Concat(SubCatBox.SelectedItems,Subcategory&", ")})
  • Collect(ScopeCollection, {Scope: "", Subcat: ""})

The only issue I am having is that after the combobox selections are made and save button is selected to run patch and collect, my combobox selections disappear.  The form still works and my items are correctly entered into my SP list as I want after the form is submitted (using another patch function).  However, the disappearing combobox selections make for a poor user experience when moving on to enter another service type.

 

Any support would be appreciated.  For clarity, I am new to PowerApps so forgive me if I am missing something basic.  Please also let me know if more detail is needed.

ComboBoxPatchIssue[3965].png
Categories:
  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    Hi @Matt_PA_Newby ,

    What are the Items of your Combo Box?

  • Matt_PA_Newby Profile Picture
    12 on at

    Hi @WarrenBelz ,

     

    I have 2 comboboxes the first of which lists process types and the second lists subcategories (filtered depending on the result of the first box).  The source for the boxes is a separate SP list with first box using "Distinct" from one column of SP list and second box showing filtered items of a second column.  In case it matters, the first box is single selection only, while the second is multiselect (issue is the same for both though).

     

    Also for clarity, I am changing the displaymode of the boxes to view after the save button is selected (which is why the box border is gone).  The issue was present before I did this though so that is not the problem.

     

    I tried setting the default value of the boxes to match that of the collection that I was patching the combobox selection results to but got an error.

  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    @Matt_PA_Newby ,

    I thought you meant the user no longer had selections. What you mean I believe is that the value in the box disappears when code is instigated from the gallery in which they are contained? This is a well-known issue in Power Apps.

    You need to add a field to your collection (if you have not done already) to "store" the value of the drop-down (you need to Patch it there) and then "bind" the drop-down (ThisItem.FieldName) Default to this field, so when the gallery and control resets, it will take the value just patched.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Matt_PA_Newby Profile Picture
    12 on at

    @WarrenBelz ,

     

    I am already storing the result in my collection with the "Scope" field (for 1st combobox, "ScopeBox") per above formula.  I have also tried setting the Default property of the box ot ThisItem.Scope as suggested but I get an error when I do so "This formula uses scope, which is not presently supported for evaluation."

     

    I believe my formula for the patch to the collection field (ScopeBox.Selected.Result) is storing it as text.  Is this perhaps the reason for error when then trying to use the field for default property?  I am not sure how to change the patch function so that it stores it differently.

  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    @Matt_PA_Newby ,

    Make the Default of the drop-down

    {Result:ThisItem.Scope}

    or possibly

    {Result:ThisItem.Scope.Value}

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Matt_PA_Newby Profile Picture
    12 on at

    @WarrenBelz 

     

    Thanks again for the help.  That did resolve the record vs text issue (although still shows "not presently supported for evaluation") but unfortunately it has not solved the problem as the box still shows blank after running Patch.  

     

    I am surprised there seems to be so little info on this error out there as this would seem to be a major problem for building apps.

  • Matt_PA_Newby Profile Picture
    12 on at

    Ah! Fixed it! The only difference was that I needed to implement your solution into the "DefaultSelectedItems" property rather than the normal "Default" property.

     

    Thank you again @WarrenBelz for your help.

  • Verified answer
    WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    @Matt_PA_Newby ,

    Yes - looking back there is a bit of confusion over drop-downs and combo boxes (they are two different types of controls entirely).

    Default applies to drop-downs and DefaultSelectedItems to combo boxes.

    As noted, you simply need to bind the control to the source of the gallery and as long as it is patched with the update, it will display the required value.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    Hi @Matt_PA_Newby ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Matt_PA_Newby Profile Picture
    12 on at

    @WarrenBelz 

     

    Yes, the issue is now resolved and I have marked your last post as the accepted solution.  Thank you again for all the help!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard