Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Text Fields – Concatenate then Insert into Location Field
Tagged: geo-coordinates, GPS, location field, map
- This topic has 9 replies, 4 voices, and was last updated 4 years, 11 months ago by Eddy.
-
AuthorPosts
-
March 14, 2017 at 6:37 PM #21439
Gary OwnsbyParticipantWe have a fairly extensive Christmas Card Mailing List which has been converted into Tap Forms.
Each person’s address is contained in a separate field (name, address, city, state, zip). Is there a way to concatenate these via a calculation process so that the resulting concatenated text could be automatically inserted into a Location field?
With over a thousand names/addresses, manually copy/pasting them into the location field for lookup purposes isn’t time practical.
Database Structure:
First Name: John
Last Name: Doe
Street: 123 Honey Lane
City: Beehive
State: TN
Zip Code: 56565Concatenate via Calculation: John Doe, 123 Honey Lane, Beehive, TN, 56565
then insert into Location Field to produce a dot on a Google Map.
I can concatenate but don’t see a way to insert into a Location field to produce a location dot on the map.
Is there a way to do that or is a that a wishlist item?
Thanks.
Gary
March 14, 2017 at 7:25 PM #21441
BrendanKeymasterWell there’s no way to inject that into a Location field, but you can inject a value from another field into a Website Address field. Just surround your Calculation field name with square brackets and stick into your URL.
Like this:
https://www.google.ca/maps/place/%5BCalculation Field Name]
Then when you click the website button next to the field, Tap Forms will launch your web browser and take you to that location with the value substituted for [Calculation Field Name].
I know not exactly what you’re looking for. But the Location field inside Tap Forms needs more than just the address. It also needs the geo coordinates. The geo coordinates are either derived from your current location, where you dragged the pin on the map, or by explicitly searching for an address in the Search field on the map view sheet.
March 14, 2017 at 7:59 PM #21442
Gary OwnsbyParticipantThank you Brendan.
Meaning no disrespect, the mission was simply to auto-populate the map from address data (in each record) rather than clicking on the Location Field Icon then copy/paste the data into the map search field when the map displays initially. Once the lookup is done, then clicking the save button so it’s retained for future reference within that specific record.
You know far more than I about the map lookup function; however, with Tap Forms map lookup or map lookup done on Google Maps directly, all I need to locate a place is it’s simple address:
Street Address, City, State, Zip
I have done this before with Google Sheets and Fusion Tables with nothing more than the info listed above. So it does seem to work okay.
Using the suggested weblink approach does work but it’s a map at the record level…not one map with multiple dots on it.
I would also suggest having the ability to easily display a map within each record that is derived from the address data contained within the record. This would also be very useful in asset management or a realty app. Knowing where something is, is often very handy.
Again the idea is simply to take within-record data and automatically generate a location map within each record OR to generate a “global” map that shows all the dots based on plotted location of all the addresses in the full database.
Again, no disrespect intended just looking for a slicker way to develop the maps without some of the cut & paste/save effort.
Thank you again…Tap Forms is great.
Gary
March 14, 2017 at 9:57 PM #21444
BrendanKeymasterHi Gary,
No disrespect taken. I love getting feedback like this.
The Mac version 5 does have a view to show you multiple pins (one per record) on the same map.
And you can tap on a location field to view the contents too.
But I agree it would be good to have the ability to resolve all the locations given a field with address information in it. And then you could view all that information on the same map.
Thanks!
Brendan
March 15, 2017 at 4:31 AM #21446
Gary OwnsbyParticipantThank you Brendan.
Perhaps we’ll see that feature in the future. Thank you again.
Gary
October 16, 2019 at 6:04 PM #37171
CalionParticipantSo to be clear—there’s not a way to concatenate several fields into one, such as putting several address fields into the Location field?
October 16, 2019 at 6:15 PM #37172
BrendanKeymasterYou could write a script to copy data from one field into a Location field. But you should look at the structure of a Location field before you set the value of one. It’s a dictionary of keys and values: long, lat, and title. The title is the location address and long and lat are the longitude and latitude coordinates in decimal format.
January 9, 2020 at 6:20 AM #39127
EddyParticipantHi there!
So, I wrote a little script to fill the location field with the information already stored in other fields. It works finde, BUT: After the location field is automatically filled now with the text, I have to clic manually on the loacation field to force to search and store the geo-coordinates.
QUESTION: Any way to let the location field be automatically completed with the geo-coordinates? As far as it works half-automatically (I just have to make a stupid click) I am full of hope…
Regards,
Eddy
function fill_locationfield() {
var street = record.getFieldValue(‘xxx’);
var postcode = record.getFieldValue(‘xxx’);
var city = record.getFieldValue(‘xxx’);
var country = record.getFieldValue(‘xxx’);var lacation_field_id = ‘xxx’;
var text_for_locationfield =
street + “, ” + postcode + ” ” + city + “, ” + country;record.setFieldValue(lacation_field_id, text_for_locationfield);
document.saveAllChanges();
}fill_locationfield() ;
January 9, 2020 at 1:25 PM #39134
BrendanKeymasterHi Eddy,
It’s not possible right now because all of the code to fetch the location coordinates for a given address exists only on the screen that shows you the map. There’s also a delay in fetching the geo coordinates because another process has to be kicked off to call to Apple’s servers and wait for a response. It would require a new script API to support triggering the calls to Apple’s Core Location framework. I’ll add your request to my requests list.
Thanks,
Brendan
January 10, 2020 at 6:37 AM #39149
EddyParticipantThanks, Brendan!
Actually, I found a way of fast clicking through all the records to add the location field to each. But of course, it would be nice, if this could be automated.
Regards, Eddy
-
AuthorPosts
You must be logged in to reply to this topic.