web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Bing Map API error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

I am trying to create an attendance system which would allow the employees to check in and check out through the application. The check in and check out would allow the users to store the data like user name ,email, check in date and time and check out date and time , location longitude , location latitude. I am also trying to store address based on location longitude and location latitude.
Now,

the issue that I am getting is while storing location address.
I am using the below code for patch function, the patch works fine and the data gets stored except the location text which uses the Bing map api (getlocationbypoint).

Patch(
 'Attendance System', /* <-- '20181115_CheckInAndOut' represents the SP list on my side, you should replace with your own list*/
 Defaults('Attendance System'),
 {
 Title: "Test",
 EmployeeName: username,
 EmployeeEmail: useremail,
 CheckInDateandTime: Now(),
 LocationLongitude:Location.Longitude,
 LocationLatitue:Location.Latitude,
 LocationText:BingMaps.GetLocationByPoint(Location.Latitude,
 Location.Longitude).address.addressLine

 }
);
Navigate(success_checkin,ScreenTransition.CoverRight)


Below is the error i am facing

Jayant2_1-1604670375177.png

 

any idea how i can store the address based upon longitude and latitude.
Would appreciate if any help is provided.
Cheers!!



Categories:
  • timl Profile Picture
    37,306 Super User 2026 Season 2 on at

    Hi @Anonymous 

    Your formula looks correct. You might want to remove the line break that separates the call to
    BingMaps.GetLocationByPoint to see if that makes a difference.

    To diagnose this further, I would add a label and set the text property to the call to Bing Maps.

    BingMaps.GetLocationByPoint(Location.Latitude,
    Location.Longitude).address.addressLine)
     

    image.png

    Do you still receive the error that there is an invalid value for latitude? If so, I would check the return value of Location.Latitude. Does that look like a valid value?

    If not, I would store the return value of GetLocationByPoint to the variable and I would use that in your call to Patch.

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Anonymous ,

    There is a strange issue indeed. I did a test on my side and everything worked fine.

    Can you please try to allocate a context/global variable for each Location.Latitude and Location.Longitude and use inside patch function those 2 context/global variable.

    Also, i think that the  .address.formattedAddress is better than .address.adressLine as it's return the complete address of your point.

    Hope it helps !

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @gabibalaban It is a strange issue. I tried the above method that you told me even that did not work.
    I asked the users to test it and everything is working fine even the longitude and latitude are getting populated but not the address.
    can you tell me what shall I do on this?

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous 

     

    As @timl said in his post, make a test based on the same logic, use a variable or label.text to see if    BingMaps.GetLocationByPoint(Location.Latitude,Location.Longitude).address.addressLine is returning an answer indeed.

    Don't forget that this connector is in preview and it is not uncommon to have a deficitary answer.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @gabibalaban i tired putting the value in the label and location latitude is returning the value however, i am getting the above error in the label.

    Jayant2_1-1604899886465.png

     

     

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous That is obiouvsly something wrong with your connector. To be sure that everything is ok, can you detele the actual BingMaps connector and recreate it ? 

    Please check on https://www.bingmapsportal.com/Application  your API key.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @gabibalaban i tired creating a new  connector and it worked perfectly. i am able to store the address in a text box now. However, when the user checks in the value gets stored but i am still receiving the same error on the screen but the value is stored.
    is it possible i can handle the error and not show the user the error when he/she clicks on check in button?

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous ,

    Well i'm affraid that this connector is in a preview mode so this kind of behaivor might appear. 

    What you can try is to quit studio and reload your app or try to run your app directly in play mode, to see what happens, it might or it might not work 😊

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard