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
Highlighted
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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,879)