cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnjohn123
Post Prodigy
Post Prodigy

Get the current user coordination when submitting a form

We have a Power App standalone canvas app which is connected to SQL. now when the user submit a form we need to capture his coordinates' latitude longitude? is this possible?

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
Nogueira1306
Community Champion
Community Champion

Yes it is

 

Location.Latitude 

 


Location.Longitude 

 

You can set the default of textbox like that

View solution in original post

v-qiaqi-msft
Community Support
Community Support

Hi @johnjohn123,

Do you want to get the GPS coordinates for each submitter?

Could you please tell me that if you want to save this coordinates data in your data source?

Generally, the GPS coordinates would not display like a pop-up message, it usually display as a text string in the screen which could not be affected by user interaction. It just displays in a Label or TextInput control.

If you want to save it, you should create 2 fields to store the coordinates value, just add the corresponding field to your form, and set the Default property of the Text Input as below:

"lat:" &Location.Latitude& "," & "lng:"&Location.Longitude

Once you submit form, the coordinates values could be saved to your SQL table as well.

If you do not want to save it into your SQL table, you just need a Label or a Text Input and set the formula as above to display the  GPS coordinates.

Hope it could help you.

Best Regards,
Qi

View solution in original post

7 REPLIES 7
Nogueira1306
Community Champion
Community Champion

Yes it is

 

Location.Latitude 

 


Location.Longitude 

 

You can set the default of textbox like that

View solution in original post

@Nogueira1306Thanks for the help ...so this will show a popup on the user browser to allow getting the current location,, is this correct?

Yes sir

@Nogueira1306  so is there a way to always get the coordinations even if the user disable or reject the popup?

Nope... That is like the camera control, for example

@Nogueira1306  ok make sense

v-qiaqi-msft
Community Support
Community Support

Hi @johnjohn123,

Do you want to get the GPS coordinates for each submitter?

Could you please tell me that if you want to save this coordinates data in your data source?

Generally, the GPS coordinates would not display like a pop-up message, it usually display as a text string in the screen which could not be affected by user interaction. It just displays in a Label or TextInput control.

If you want to save it, you should create 2 fields to store the coordinates value, just add the corresponding field to your form, and set the Default property of the Text Input as below:

"lat:" &Location.Latitude& "," & "lng:"&Location.Longitude

Once you submit form, the coordinates values could be saved to your SQL table as well.

If you do not want to save it into your SQL table, you just need a Label or a Text Input and set the formula as above to display the  GPS coordinates.

Hope it could help you.

Best Regards,
Qi

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,743)