Working with Address data Hi folks, Our con...

expressions
(David Ackling-Jones) #1

Working with Address data

Hi folks,

Our consultants are on the road, driving from client to client. Each client is in Appsheet with an Adress data type.

I would like to be able to extract the City from an Address field, so staff can group their clients by City and plan their visits.

Is there a function to extract the City property from an Address data object?

e.g. if I could I have a calculated column with the expression

city([Address])

that would be great.

cheers,

David.

#2

It would be a good feature, but we don’t have this ability now. You can submit a feature request here:

AppSheet : mobile apps from spreadsheets : Login appsheet.com

(Aleksi Alkio) #3

If you have it in your address value and it’s the last value separated with comma, you could split that value. Would that work for you?

(Steven Coile) #4

Instead of collecting the address as a single value, you could collect the individual components (street address, city, state, etc.). If you then need a consolidated address (e.g., for mapping), you could assemble it from the components in a virtual column.

(David Ackling-Jones) #5

I love the autocomplete feature of the address input though. It is great.

Can you see a way to add a public method to your address class to allow a function to extract properties from an address object?

(Philip Garrett) #6

@David_Ackling-Jones

Steve is correct. You should define the address using individual fields such as Street, City, State, ZIP.

AppSheet will automatically recognize that the fields are all part of the same address. It will automatically create an Address field that is populated with the Street, City, State, and ZIP values.

The address will be geo-coded and displayed on Google maps.

See topic “Automatically Computed Address Field” in this article help.appsheet.com - Column Types: Diving Deeper

Column Types: Diving Deeper help.appsheet.com

#7

@David_Ackling-Jones At the point the autocomplete result comes in, it includes the structured data of which text belongs to which part of the address. But currently we are only keeping the full text of the address as the value of the column. If we only care about getting the city and other fields out at the point you’re selecting the address in the input, it would make things easier because we could have functions that just check those details. But generally functions should work wherever and whenever they run, and to support that we would have to save that structured data somewhere or commit to searching the address again every time it’s needed. Adding @praveen to consider if/how we could try to support this.

(David Ackling-Jones) #8

Thanks Adam!!