Help

Re: How to force a form to make an Address show as St #, St, City, State, Zip

1752 0
cancel
Showing results for 
Search instead for 
Did you mean: 
mc585
4 - Data Explorer
4 - Data Explorer

I use Airtable for my business and have my customers fill out a form with their info. For the Address column I currently have it as a single line text and that is causing issues. Customers are filling it out is '10 whalen rd' instead of "10 Whalen Rd Rochester NY 14608". I have the field as required however because it is a single line text I can't force how the address is implemented. How can I fix this?

4 Replies 4
Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

Hey @mc585 One way to solve this would be to break the address up into multiple components and then use a formula to 'build it back together'. Like when you purchase something online, there's usually 'address line 1' and 'city' and 'zip code' etc. Here's an example you can emulate.

Table Setup:

 

Screenshot 2023-11-06 083449.png

 Formula To Combine Address Fields:

Screenshot 2023-11-06 083509.png

CONCATENATE(
  IF(
    {Address Line 1}, CONCATENATE({Address Line 1}, ", "), ""
  ) , 
  IF(
    {Address Line 2}, CONCATENATE({Address Line 2}, ", "), ""
  ),
  IF(
    {Address City}, CONCATENATE({Address City}, ", "), ""
  ) , 
  IF(
    {Address State}, CONCATENATE({Address State}, ", "), ""
  ), 
  IF(
    {Address Zip}, CONCATENATE({Address Zip}, ", "), ""
  ), 
  IF({Address Country}, {Address Country}, "")
)

 

Thank you! I was thinking about doing this but was hoping there was a better way. These formulas will be helpful though!!

I did what you put above and it worked great thank you! I have an Interface addon with Page Designer that makes invoices for me and it pulls the customer's info from when they fill out the form. However, now if I change where that invoice is pulling the address from then every invoice from today on will be correct but all the old ones will show a blank address. How do a make a formula for a new column that will show both my old address column and the new formula one? (Obviously only one will be filled out so I won't end up with two addresses). And is there a way to prioritize the order of which is chooses incase there are two filled out?

You can use an IF() formula to do this.

The formula below checks to see if a value is present in the old address field. If there is, it returns that value, otherwise, it computes the address using the formula referenced above. TLDR, this prioritizes the Old Address Field.

IF({Old Address Column}, {Old Address Column}, *INSERT FORMULA FROM ABOVE*)

 

The formula below prioritizes the new address fields. You'll need to insert one of the new address fields in the first argument.

IF({One of the New Address Input Fields}, *INSERT FORMULA ABOVE*, {Old Address Field})