Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

Combobox field erases the associated field in Excel when another field is changed in edit mode.

Like (1) ShareShare
ReportReport
Posted on 20 Sep 2024 14:20:38 by 8
I have a PowerApps form and when the user has the record in edit mode, items can be selected from a particular combobox. When the edit from is submitted, the correct record is updated with the correct selected items in Excel but my problem is that when the record is put back into edit, for any field or reason, this particular combo box resets to blank. Does anyone know how to make this stop happening?
 
It's a multiselect.
 
When I add a record, the combo box saves correctly. I have copy and pasted the DefaultSelectedItems and adjusted them to reflect the new combobox but it's not saving. I am noticing I am having the same problem with a seperate form/combobox.
 
 
Database: Excel
 
Card default:
ThisItem.PROGRAMMATIC_ALIGNMENT
 
Card Update:
Left(Concat(ComboBox1_1.SelectedItems, PROGRAMATIC_ALIGNMENT & ", "), Len(Concat(ComboBox1_1.SelectedItems, PROGRAMATIC_ALIGNMENT & ", "))-2)
 
DefaultSelectedItems:
LookUp(FundraisingTable, NAME = ThisItem.NAME)
 
Advanced:
On Change is false
OnSelect is false
Reset is fase
Select Multiple is true
  • Suggested answer
    FLMike Profile Picture
    FLMike 27,286 on 21 Sep 2024 at 01:03:01
    Combobox field erases the associated field in Excel when another field is changed in edit mode.
    Hi
     
    What you are saying doesn't make sense. Let me explain and be clear you keep saying
     
    When I select from the combobox, it saves correctly into Excel. (ok so you do a Form Submit and it works as intended)
     
    When I open the edit screen and change any other field, not touching the combo box, it clears the combobox in Excel making it blank.
    What does when I change, meaning you select something and save it again and now its empty?
     
    Or when you select something in the UI and it changes and disappears? Which one
     
    Also there is a difference between the first Save and the Next
     
    are you doing a form submit or a patch statement?
     
    Also, there are other things like, the datasource is NOT refreshed, or the OnChange didn't trigger so in fact it doesn't realize there ARE any details to write.
     
    Hence my first original post which covers all the others. What you need to do is
    1) have a label on the screen (for testing), in the label, have it grab the items from the one multi-select choice, verify that it SEES that data
     
    Then also post your data here. You need to start sharing the screens, the Form modes, everything, because what i said originally is the answer still. You aren't doing them correctly and have to verify what it sees but also what Mode you are using and exactly what type of patch you are doing.
     
     
  • BD-20091352-0 Profile Picture
    BD-20091352-0 8 on 20 Sep 2024 at 16:53:16
    Combobox field erases the associated field in Excel when another field is changed in edit mode.
    It's multiselect.
  • BD-20091352-0 Profile Picture
    BD-20091352-0 8 on 20 Sep 2024 at 16:52:21
    Combobox field erases the associated field in Excel when another field is changed in edit mode.
    When I select from the combobox, it saves correctly into Excel. When I open the edit screen and change any other field, not touching the combo box, it clears the combobox in Excel making it blank.
     
    When I add a new record and select from the combo box, it saves correctly.
     
    I copy and pasted the DefaultSelectedItems from the Add screen to the Edit screen and adjusted the Combobox to reflect the one for Edit. It did not work.
     
    Another combobox I have on another PowerApps form is also doing this same behaviour.
     
    Any suggestions on how to correct it?
     
    Thank you
  • Suggested answer
    Ammar Zaied Profile Picture
    Ammar Zaied 97 on 20 Sep 2024 at 16:15:16
    Combobox field erases the associated field in Excel when another field is changed in edit mode.
    The issue you're experiencing with the ComboBox resetting to blank in edit mode is likely due to the way the DefaultSelectedItems property is configured. Specifically, it seems like the ComboBox isn't correctly setting the selected items from the record when it's being loaded back into edit mode.
  • Suggested answer
    FLMike Profile Picture
    FLMike 27,286 on 20 Sep 2024 at 15:54:30
    Combobox field erases the associated field in Excel when another field is changed in edit mode.
    HI
     
    You say it resets to blank, there is a difference between it not selecting what you want, and being blank.
     
    So is it blank (in which case your items property is wrong, or your forms Item property is wrong), or is it not setting the proper selected items, which would mean your LookUp is wrong or again your forms item property is wrong)
     
    based on what you said I dont think its the Form property, so the only other thing is the default versus defaultselecteditems, and of course that the Excel file actually doesn't have the right value for this selected item (form level)
     
    Is it multi-or single select?

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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,654

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,440

Leaderboard
Loading started
Loading complete