cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnjohn123
Super User
Super User

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
Super User
Super User

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
Super User
Super User

Yes it is

 

Location.Latitude 

 


Location.Longitude 

 

You can set the default of textbox like that

@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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,398)