Aaron McCausland
10/08/2025, 12:59 PMCeligo AI
10/08/2025, 1:00 PMAI generated answer (using internal Slack threads):To get the full address of a Location in a Saved Search, you can use the
address
field. However, this will return the address as a single string, including line breaks (\r\n
) to separate the different parts of the address.
Here is an example of how you can retrieve the address:
javascript
var locationFields = search.lookupFields({
type: search.Type.LOCATION,
id: locationId,
columns: ['address']
});
In this example, locationId
is the internal ID of the location you want to retrieve the address for. The address
field will return the full address as a string.
If you want to get the individual parts of the address (like country, state, city, etc.), you can use the address1
, address2
, city
, state
, zip
, and country
fields. However, note that the country
field will return the country name, not the country code. If you want the country code, you should use the countrycode
field instead.
If you want to get the address as a subrecord, you can use the viewSubrecord
method on the location record, like this:
javascript
var addressSubrecord = locationRec.viewSubrecord('mainaddress');
In this example, locationRec
is the location record you want to retrieve the address for. The viewSubrecord
method will return the address as a subrecord, which you can then manipulate as needed.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/08/2025, 1:00 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827881
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825500607
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812988341
Celigo AI
10/08/2025, 1:00 PM