// Attempt to retrieve coordinates from the "Property zone 1" field
var location = entry().field("Property zone 1");
if (location && location.lat !== null && location.lng !== null) {
// Return lat and lng as a string to confirm access
"Location: " + location +"\nLatitude: " + location.lat + ", Longitude: " + location.lng;
} else {
"Error: 'Property zone 1' does not contain valid location data.";
}
I don't seem to be retrieving an array, or any additional information from the field. If I change which coordinate appears at the top of the list, the information in my Perimeter field updates accordingly.
I am trying to pull an unknown number of coordinates from the location field. Am I just missing something here? I was attempting to use the .attr function as well, but that only resulted in errors. I don't see any way to define that I want to retrieve all of that information. Is this possible with memento?
Thank you in advance.

Perimeter Result
// Attempt to retrieve coordinates from the "Property zone 1" field
var location = entry().field("Property zone 1");
if (location && location.lat !== null && location.lng !== null) {
// Return lat and lng as a string to confirm access
"Location: " + location +"\nLatitude: " + location.lat + ", Longitude: " + location.lng;
} else {
"Error: 'Property zone 1' does not contain valid location data.";
}
Perimeter
field("Property zone 1");
I have checked the data type, and it doesn't appear to be returning the results in an array like a linked entries are. I was able to easily pull the linked entries to create an inventory library that was automatically adjusted by a work order library, and access each object's attributes from the returned object, but I can't seem to find a way to get a similar result here.--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mementodatabase/23b569eb-22cb-4ded-8145-0186bc289d38n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mementodatabase/823052cb-fe3e-4812-bc32-c02af2eee866n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mementodatabase/4c7f8079-6c21-4470-b6a4-06da028f00ccn%40googlegroups.com.