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.
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
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?
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.
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?
I got around this by writing an appscript function in the underlying google sheet to convert the address field into city:
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
Hi Phil
Is it possible to do this in the opposite direction?
Say we input the full address, can it then automatically split into specific address columns,
Eg Address: 22 Silwood Road, Milnerton, cape town, south africa, 7700
Split to:
Street: 22 Silwood Road
Suburb: Milnerton
City: Cape Town
Thanks!
Liam
Thereโs no built-in way to do that. You could try to do it with expressions, but Iโd expect it to be very error-prone.
Hi Steve.
Thanks for the response. I thought that would be the case. The variation in address format is just too much. Will post here if we figure out a solution to extract the specific data we are needing
Thanks again,
Liam
@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.
Did you ever figure out a solution here that is only somewhat error prone?
Thanks Adam!!
hi, i have a similar question and i donโt want to make a new topic (correct me if iโm wrong)
i have a โCityโ field, and a calculated โstate/provinceโ and โregionโ fields
i do not mind haev a street, itโs not needed.
May i make a calculated address column? the street could be whatever street in that city
Hi everyone,
What if I want to extract the city from the current position?
Thank you
Not possible with AppSheet itself.
Thanks Steve,
alternatively is it possible to list all latlon coordinates distant
from a predefined destination?
You can use the DISTANCE() function to calculate the (straight-line) distance (in km) between two LatLong values. Would that help?
I really think so. In the help, I find some material on how to use this function.
Thank you so much
User | Count |
---|---|
38 | |
35 | |
27 | |
23 | |
18 |