cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Combo Box goes blank when SubmitForm is clicked

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! 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

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.

 

Highlighted
Continued Contributor
Continued Contributor

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  

If this solved the problem for you, feel free to hit "Accept as Solution" so others can find the answer easier. 🙂

Kind regards,

Ben Fetters
Power Apps/Power Automate Developer
www.sovereignsp.com
Highlighted
Community Support
Community Support

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

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!

Highlighted

@tgibso2 ,

That is exactly what I put in my response.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,502)