Announcements
Hi all,
I have a formula in a label that calculates distance from two location, however as it's not pulled from a column i haven't been able to find a way to apply a sort to the gallery so i can sort the results in ascending order based on distance ( the label not connected to a column) I have added a picture, is there a way of doing this or work arounds? so far no one has been able to answer previous posts
HI @jsmith87 ,
You need to use AddColumns in the Gallery Items with the same formula as the Label - you can then sort of that column.
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.
MVP (Business Applications) Visit my blog Practical Power Apps
Hi, Appreciate the help. Is there any way you could show me exactly how to do that? i've been on this issue for days and just want to sort it. I'd really appreciate it.
Hi @jsmith87 ,
You would need to use the actual fields containing those values (instead of the control content) with ThisItem in front, but the formula structure would be the same. As a word of caution here, last time I tried this in a gallery with Bing Maps, the connector crashed due to too many concurrent queries.
Thank you, really appreciate the help
Hi,
So i have input the add colums to a button which seems to works fine
AddColumns(Table,"Distance",BingMaps.GetRouteV3("Driving",Start.Selected.Result,End.Text,{distanceUnit:"Mile"}).travelDistance)
However when i use this for my gallery i get loads of errors, can you let me where i'm going wrong please
As mentioned, you need to use the field names in your table (assuming the names as start and end here)
AddColumns( Table, "Distance", BingMaps.GetRouteV3( "Driving", Start, End, {distanceUnit: "Mile"} ).travelDistance )
ignore that last picture, see below
@jsmith87 ,
Actually does not need ThisItem - see amended post
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 356 Most Valuable Professional
11manish 225 Super User 2026 Season 2
Mohsin Ali 211