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!
Solved! Go to Solution.
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,
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.
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
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,
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!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
207 | |
188 | |
80 | |
50 | |
38 |
User | Count |
---|---|
305 | |
256 | |
121 | |
73 | |
56 |