cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

"Invalid use of "." " when using Location.Longitude/Latitude

Hello,

 

I'm following the instructions here: https://powerusers.microsoft.com/t5/General-Discussion/Google-map-and-pin-in-PowerApps/td-p/3209/pag... and can create the map and such without issue. I even have Location.Latitude and Location.Longitude working in the google map URL:

 

"https://maps.googleapis.com/maps/api/staticmap?center=" & Location.Latitude & "," & Location.Longitude & "&zoom=18&size=600x600&key=<myAPIKey>=color:red%7Clabel:A%7C"

 

However, when I try to use Location.Latitude or Location.Longitude in a function, Intellisense does not correctly highlight the function. I get the error "Invalid use of "." pointing me to the period between Location and Latitude/Longitude. 

 

Anyone else having this issue? It worked fine THE FIRST TIME I typed the function. Now won't work. 


Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ericonline
Community Champion
Community Champion

AHA! Figured it out... 

 

The Location function cannot be called from a button inside a form Card. If button is outside the card, not problem. If INSIDE the card, the error appears. 

View solution in original post

1 REPLY 1
ericonline
Community Champion
Community Champion

AHA! Figured it out... 

 

The Location function cannot be called from a button inside a form Card. If button is outside the card, not problem. If INSIDE the card, the error appears. 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,343)