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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,381)