web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combo box value displa...
Power Apps
Unanswered

Combo box value displays value but when I try to write to database it returns NULL

(0) ShareShare
ReportReport
Posted on by 106

Hello,

 

We have a combo box which does not allow for multiple selections.

The DefaultSelectedItems is set to:

If(EditForm_Checklist.Mode=New,{Value:"...Select a value"}, {Value:ThisItem.LGL_Checklist_CompanyName})
 
The Update of the card is set to:
cmbCompanyName.Selected.Result
 
This displays the correct record (either '...Select a value' or the previously selected item) - but when user clicks the save button - PowerApps does not recognize the field and thinks it is blank.  Does not read the selected value.  Strangely, if the user then reselects the same value from the dropdown box (the one that already appears) then it works.  This worked properly last week and we have not made any changes to the app. 
 
Any help appreciated,
Thanks - Dan
Categories:
I have the same question (0)
  • Florian_Kleinz Profile Picture
    227 on at

    Hi Dan,

     

    ComboBoxes can be a pain in the ass because technically they return tables instead of single values like dropdowns.

    So if ComboBox.Selected.Value does not work maybe you can use:

    First(ComboBox.SelectedItems).Value

    Combobox.SelectedItems returns a table with all selected values (in your case it is only one because multiselect is disabled.

     

    Please let me know if this works.

     

    Best regards

    Florian

     

  • lesotho_kid Profile Picture
    106 on at

    Thanks Florian!  Appreciate your assistance with this.

    Unfortunately, that did not work either.  It actually worked the same way as the first method - where it doesn't work the first time the page opens - but if you reselect the same value - then it works.

    I may just try deleting and re-adding it - unless you have any other ideas.

     

    Thanks,

    Dan

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @lesotho_kid ,

    Could you please show more details about the formula you typed within the Items property of the cmbCompanyName?

    Further, do you type a Distinct formula within the Items property of the cmbCompanyName?

     

    Regarding the issue that you mentioned, I think you have typed Distinct formula within the Items property of the cmbCompanyName, right?

     

    Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify the formula within the DefaultSelectedItems property of the ComboBox to following:

    If(
     EditForm_Checklist.Mode = FormMode.New,
     {
     Result: "...Select a value"
     }, 
     {
     Result: ThisItem.LGL_Checklist_CompanyName
     }
    )

     

    Please try above solution, check if the issue is solved.

     

    Regards,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard