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 goes blank w...
Power Apps
Answered

Combo Box goes blank when SubmitForm is clicked

(0) ShareShare
ReportReport
Posted on by 11

Hi all,

 

I'm having an issue with my app as follows.

 

My app is a form of logbook to record when a person visits an electrical substation in a SharePoint list.

 

The main column in the SharePoint list is a Choice column called "Substation". When I first created the app, in the edit gallery, the "Items" formula for the Substation Combo Box was set to Choices('Substation Logbook'.Substation) which worked fine.

 

However, I want to make the app a bit smarter and list the choices in the combo box drop down by distance from the user. I've achieved this by collecting a list of all available substations with their latitude and longitudes, and adding an additional column to the collection to calculate the distance. The collection is called Dist.

 

I then set the Items under the Substation Combo Box to

Distinct(SortByColumns(Dist,"Distance"),Site)

where Distance is the distance from the user to the substation and Site is the substation name.

 

This achieved the desired outcome of listing all the substations in order of distance, but now when I fill out the form and hit the SubmitForm button, all the form data copies into SharePoint except for the Substation name, it just appears blank. 

 

I've tried replacing the Combo Box with a drop down input but I still get the same result.

 

Could anybody please help?

 

Thanks in advance! 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @tgibso2 ,

    The Update of this Data Card needs to be something like

    {Value:YourComboBoxName.Selected.Result}

     

    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.

     

  • BenFetters Profile Picture
    on at

    First of all, that is so cool you calculated the distance like that and were able to sort them like that. Way cool!

     

    The only thing I can think of is perhaps your update formula of the data card that contains the combo box. There might be something going on there. I'm guessing that because you're using the Distinct function, the value of the combo box is not matching up with what SharePoint is expecting. What's the formula in the Update property? 

     

    Let me know if that didn't make sense and I'd be happy to explain it better.

     

    Kind regards,

     

    Ben Fetters

    www.sovereignsp.com  

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

    Hi @tgibso2 ,

    Based on the issue that you mentioned, I think there is something wrong with the formula you typed within the Update property of the "Substation" field data card in your Edit form.

     

    I have made a test on my side, please take a try with the following workaround:

    Set the Items property of the "Substation" ComboBox in your Edit form to following:

    Distinct(SortByColumns(Dist,"Distance"),Site)

    Set the Update property of the "Substation" field data card in your Edit form to following:

    {
     Value: SubstationComboBox.Selected.Result
    }

    Set the DefaultSelectedItems property of the "Substation" ComboBox to following:

    {
     Result: ThisItem.Substation.Value
    }

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • tgibso2 Profile Picture
    11 on at

    Thanks all!

     

    It was just the update property of the data card.

     

    Where it was originally set to 

     

    SubstationComboBox.Selected

     

    Updating it to

    {
     Value: SubstationComboBox.Selected.Result
    }

     seems to have done the trick!

     

    Thanks again for the responses, very much appreciated!

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    @tgibso2 ,

    That is exactly what I put in my response.

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard