Brian Dunning's FileMaker Custom Functions

SetFullAddress ( street1 ; street2 ; city ; state ; zip )

Simple function to build a full address from separate address fields. Currently only configured for US type addresses.

  Average rating: 5.0 (1 vote) Log in to vote

Robert D Trammel   Robert D Trammel - Show more from this author
Harmonic Software Production Studios
https://www.harmonic-data.com

Share on Facebook Share on Twitter

  Sample input:
1) SetFullAddress ( "123 Easy St." ; "Apt 256" ; "Dallas" ; "TX" ; "55555" )
2) SetFullAddress ( "123 Easy St." ; "" ; "Dallas" ; "TX" ; "" )
  Sample output:
1) 123 Easy St, Apt 256, Dallas, TX 55555
2) 123 Easy St, Dallas, TX

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Get a fully formatted address without the need to rewrite the calculation every time you have to concatenate street address information. This takes into account missing values, etc.

 

Comments

David Zakary   David Zakary
May 20, 2022
There is a much easier way to accomplish this...
Ignoring all of the Proper and Trim stuff, try this...

List (
Address_1;
Address_2;
Substitute (List (City; State); "ΒΆ"; ", ");
Country;
Zip
)

If you want Address_1 and Address_2 on the same line, put in the same code as the City and State fields use. Much easier to account for missing entries as the List function ignores them.
 
Robert D Trammel   Robert D Trammel, Harmonic Software Production Studios
May 20, 2022
Agh. I knew there was an easier way to do it. Thanks David.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 18 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: