Forum Discussion
Hi Barry,
Are you wanting to know how to get the Lat and Long for a given address? You can't do it directly in quickbase, you'll need to use an outside service like google or geocodi.io and a pipeline to geocode, but it's pretty simple to set up.
------------------------------
Jeff Peterson
------------------------------
I am wanting to get the lat/long for the current location.
When a user taps a button on the qb mobile app it will capture the current time and update a form field. I have this much set up and working. But what I also need is to capture the location of that user when the button is tapped.
This is functionality we're programming to replace our time clock so employees can clock in/out on the mobile app. But we need to be able to determine where they clocked in from.
I saw an older post with a similar question, regarding government mandates for that person's needs, but there wasn't any response to the post.
I'm getting more familar with API's in pipelines, so I'd be interested in learning more of what you suggest.
Thank you,
------------------------------
Barry Dolan
------------------------------
- ChayceDuncan2 years agoQrew Captain
Getting the current location will require some coding outside of native Quickbase. Your process would likely need to use a code page where the user clicks a button and navigates them to said codepage where you have some javascript that logs the date/time and their information. In that code you would have to use your browser or devices geolocation API or service to get the current position and then log it.
In this situation you can't use Pipelines because its independent of the user at that point, and unfortunately Quickbase doesn't have any native services specific to geolocation.
------------------------------
Chayce Duncan
------------------------------- BarryDolan2 years agoQrew Cadet
I'm familiar with the method you outline. Kirk had his URL formula call a code page, which isn't working.
I use a code page that I found on the Magic Buttons app to capture the current time.
I also found code page that I can call from a button to open a popup window and then get the current lat/long. (attached), but I don't know how to get what I need from it. It works, but not on a mobile.
------------------------------
Barry Dolan
------------------------------- ChayceDuncan2 years agoQrew Captain
At this point it would really just be trial and error with that code you linked above. That code is valid for modern browsers and should remain working on mobile, however you'll likely need to play around and attempt to tweak the response and display the full error string on screen so you can actually see what's going on.
Its possible that the configuration of the button as a pop up isn't working since its on a mobile device, or there might be something about your device settings that is blocking your device from responding to the geolocation API. Someone else on this forum might chime in later with existing code that you could copy, but best course now is just to play with that existing code and figure out what, if any errors are responding once you cross over to mobile.
------------------------------
Chayce Duncan
------------------------------
Related Content
- 2 months ago
- 6 months ago
- 6 months ago
- 6 months ago