cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

get gps coordinates

i need to have a button when press ill get the gps coordinates in a datacard text input

 

can you hel please ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: get gps coordinates

Set a button with variables:

 

UpdateContext({var_currentLat: Location.Latitude})
;;
UpdateContext({var_currentLong: Location.Longitude})

 

And a label text property :

 

"Latitude: " & var_currentLat & " Long" & var_currentLong

 

Press the button see if it works

View solution in original post

3 REPLIES 3
Power Apps
Power Apps

Re: get gps coordinates

You can set a variable with the GPS coordinates (using the Location signal), and set the Default property of the text input control to use that variable. For example, if you set this expression to the button's OnSelect property:

UpdateContext({lat: Location.Latitude, lng: Location.Longitude})

And you set the Default property of the text input control to

lat & "," & lng

Then when you press the button the coordinates will be shown in the text input control.

Highlighted
Anonymous
Not applicable

Re: get gps coordinates

Set a button with variables:

 

UpdateContext({var_currentLat: Location.Latitude})
;;
UpdateContext({var_currentLong: Location.Longitude})

 

And a label text property :

 

"Latitude: " & var_currentLat & " Long" & var_currentLong

 

Press the button see if it works

View solution in original post

Highlighted
Helper II
Helper II

Re: get gps coordinates

This gives me My coordinates.

What if i want coordinates of another user in my organization.

 

something like :

Office365Users.UserProfileV2("abc@xyz.com").Location.Latitude

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,917)