cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

BingMaps.GetRoute failed

BingError.jpg

 

When I play my PowerApp outside of the studio, I get this error when the app opens. However, the error does not show within the studio. Playing the app outside of the studio, I can still use the app, but the error notification is annoying. A screen on my app is using Bing to calculate the distance between two cities:

 

Value(Round(BingMaps.GetRoute(StudentGallery_1.Selected.City & ", " & StudentGallery_1.Selected.State, ThisItem.HOME_CITY & ", " & ThisItem.STATE).travelDistance/1.609344,0))

 

Any idea why the error is showing?

5 REPLIES 5
Community Support Team
Community Support Team

Re: BingMaps.GetRoute failed

Hi @Anonymous 

 

Do you firstly add one BingMap Api connection?

BingMaps.PNG

If yes.

Could you please try to change your formula expression as this:

Value(Round(BingMaps.GetRoute(StudentGallery_1.Selected.City & ", " & StudentGallery_1.Selected.State, StudentGallery_1.HOME_CITY & ", " & SStudentGallery_1.Selected.State).travelDistance/1.609344,0))

 

And I test as the next screenshot shows,it works ok:

GetRout1.PNG

My formula expression:

Value(Round((BingMaps.GetRoute(Gallery2.Selected.City& "," &Gallery2.Selected.State, Gallery2.Selected.HomeCity &","& Gallery2.Selected.State).travelDistance/1.609344),0))                    (Galllery2 is my gallery control name on my side)

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

 

Anonymous
Not applicable

Re: BingMaps.GetRoute failed

Miles.jpg

 

 

@v-yuxima-msft Thank you, but my formula is calculating a city and state from my student gallery(StudentGallery_1) against all items within another gallery (Employee gallery); that is why I'm using ThisItem so that the Miles field can display the distance between all items in the gallery against the city/state at the top/left of my graphic.

 

Anonymous
Not applicable

Re: BingMaps.GetRoute failed

@v-yuxima-msft The employee gallery is empty when the app opens and its only populated when a user selects a student from the student gallery. The error goes away once the employee gallery is populated and the calculations are correct. I wonder if there's a way to only execute the calculation upon the selection in the student gallery. Not sure.

 

BingError3.jpgBingError.jpg

Community Support Team
Community Support Team

Re: BingMaps.GetRoute failed

Hi @Anonymous 

 

Could you please share more details of your two gallerys?

And what the Button control's formula expression?

I think more details will help  to analyze the issue here.

 

Best Regards.

 

Yumia

Anonymous
Not applicable

Re: BingMaps.GetRoute failed

@v-yuxima-msft Sure!

 

The screenshot with the calendar is my Student Gallery, which contains a Hometown field and a State field. The admin user will click the Select Student button to select that student and populate the student's name, hometown, and state. Next, the user will click the Select Employee arrow to navigate to the Employee gallery.

 

StudentGallery.jpg

 

 

The second screenshot, the Employee Gallery, has a filter where:

Filter(Employee DATA SOURCE,StudentGallery_1.Selected.State = EmployeeState) - Meaning, only display employees in the employee gallery where their State matches the state of the student. 

 

Employeegallery1.jpg

The Miles label in the Employee Gallery has this formula (the formula is in the label in the gallery's template):

Value(Round(BingMaps.GetRoute(StudentGallery_1.Selected.City & ", " & StudentGallery_1.Selected.State, ThisItem.EmployeeHometown & ", " & ThisItem.EmployeeState).travelDistance/1.609344,0)) - This means that the miles label will display the distance between the selected student's city/state and every employee's city/state in the entire gallery. The user will review the gallery and select the employee with the closest promixity to the student.

 

The app works perfectly, but the error message displays when you play the app in studio and in a browser.

 

 

 

 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,082)