Skip to main content

How do I put a shortened version of an address into a formula?

  • July 29, 2020
  • 2 replies
  • 35 views

Forum|alt.badge.img+11

I have a formula for my primary field that looks like this:

CONCATENATE({Last Name}, " - ", Type, " - ", DATETIME_FORMAT(Start, ‘MM/DD/YYYY’), “-”, {Job Address})

and it turns out looking like this:

Thorton - G, DS, GC, - 08/17/2020- 692 Chateau Ln. Holly Lake, Tx 75461

I would like only the House number of the address to show in the primary field. How do I shorten the address in the formula?

Thanks in Advance!

2 replies

_Zo
Forum|alt.badge.img+5
  • Inspiring
  • July 29, 2020

1.) You would use a Search function to search for the first space " " in the string which would be right after the number.

SEARCH(stringToFind, whereToSearch,[startFromPosition])

2.) Then you would use a LEFT function to extract the results from Search to only extract the content before the space

LEFT(string, howMany)

You would technically start with a LEFT function and imbed the SEARCH function inside the “howMany” part of the left function.

LEFT({Job Address}, SEARCH(" ", {Job Address}))


Forum|alt.badge.img+11
  • Author
  • Known Participant
  • January 10, 2024

1.) You would use a Search function to search for the first space " " in the string which would be right after the number.

SEARCH(stringToFind, whereToSearch,[startFromPosition])

2.) Then you would use a LEFT function to extract the results from Search to only extract the content before the space

LEFT(string, howMany)

You would technically start with a LEFT function and imbed the SEARCH function inside the “howMany” part of the left function.

LEFT({Job Address}, SEARCH(" ", {Job Address}))


I tried using this formula to extract just the City from a (Job Address) Column and it just returned an error:

Left({Job Address}, SEARCH(",", {Job Address}))

I used the Comma to search because it was the only Comma in the whole address, and it was directly after the City name... Not sure what happened?