Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

Combo Box Form Control Issues

Like (1) ShareShare
ReportReport
Posted on 4 Oct 2024 16:48:20 by 6
Hello,
 
I'm relatively new to Power Apps and I'm having some frustration with combo boxes on an EditForm control. The form has two combo boxes (amongst other form input controls). When I submit the form with an item selected in the combo box, the record updates correctly in the data source (Sharepoint List). When I return to the EditForm with same item selected, the combo box also populates correctly with the value just set. However, when I submit the form again in Edit Mode, the value is removed from the column in the data source despite the combo box appearing to hold the value.
 
I'm puzzled by why the data source column updates with no issue on first submit, but when submitting again (for the purpose of editing the record), the DefaultSelectedItems does not submit properly to the data source. The DefaultSelectedItems propery is set to lookup the record in the data source conditional on it equaling ThisItem: 
 
[LookUp(Work_Orders,'PO Number'=ThisItem.'PO Number')]
 
I feel like I'm probably making a really simple mistake here but can't figure it out. Any ideas?
 
Thanks very much.
Categories:
  • Suggested answer
    ES-04101616-0 Profile Picture
    ES-04101616-0 6 on 07 Oct 2024 at 16:42:18
    Combo Box Form Control Issues
    After some trial and error, I found a working solution. I discovered the Combo Box displayed the value previously set properly, but it wasn't using that value as a "selection" when the Update action was performed.
     
    To resolve this issue, I used the formula below in the Update property:
     
    If(
        IsBlank(ComboBox1.Selected.'Serial #'),
        LookUp(Work_Orders, 'Reference_Number' = varReferenceNumber).Serial_No,
        ComboBox1.Selected.'Serial #'
    )
     
    If the Combo Box does not have a selection, find the previously set value from the data source (Sharepoint List) and use that in the Update action.
     
    If the Combo Box does have a selection, use the selection in the Update action.
     
    Sharing in case it helps anyone else experiencing a similar issue. 
     
  • ES-04101616-0 Profile Picture
    ES-04101616-0 6 on 07 Oct 2024 at 12:22:52
    Combo Box Form Control Issues
    Thanks for the replies.
     
    @MattMann - Select property is set to what's shown below, which I believe is correct.
     
    ComboBox2.Selected.Station_Line_MRN
     
     
    @WarrenBelz - please see below...
     
    Items: 
    '2021-12-05 Master Stations and Booths'
     
    ^This is the name of the data source/Sharepoint List
     
    DisplayFields:
     
    ["Station_Line_MRN"]
     
    ^column/field in the data source
     
     
  • WarrenBelz Profile Picture
    WarrenBelz 144,367 on 04 Oct 2024 at 21:41:47
    Combo Box Form Control Issues
    Please post the Items and DisplayFields of the Combo Box and the name and type of field that it is referencing in the SharePoint List.
  • MattMan - nah nah nah nah nah nah Profile Picture
    MattMan - nah nah n... 6 on 04 Oct 2024 at 18:19:18
    Combo Box Form Control Issues
    You may want to see what is set for a "on update" value. Select the data card the combo box is stored in and select "on update."  It should read something like "datacard29.selected".

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,367

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,297

Leaderboard
Loading complete