How do I extract a very specific part of an address (thats not an "extract" option)

Hey everyone,

First time posting on here!

I have an API call that requires an address as one of the parameteres. However, the address has to be formatted specifically in all CAPS and can only say the street name, number, and direction (ex. 1234 MAIN ST NW). If it is not written this way, the API call wont return any results…

For context, the app builds report for the real estate industry, and this api call is for getting the local tax assessment info.

So I have the address that is being taken from a search box-geographic places. This works perfectly fine for all of my other APIs, but now I need to be able to extract that specific part of the address as stated above.

Here is the problem I am running into:
I have made two other data data fields labeled “street name” and “street number” which I then use the geographic address to extract from. The problem is that when it extracts the street name, it shows it as Main Street Northwest, but I need it to say “Main St NW” (I can capitalize everything later).

A glimmer of hope is that the geographic address from the search box saves as "1234 Main st NW, Toronto, Ontario, T5T 6T5, Canada. I would just need to remove the city, province, postal code and country from it, and then capitalize all of the letters.

Can anyone provide some insight on how I can go about this?

Hi there, @bmupright… if you have the address in the format of “1234 Main st NW, Toronto, Ontario, T5T 6T5, Canada”, you should be able to use the :split by operator to split by a comma and get the first item in the spit. Want to give that a shot?

Best…
Mike

1 Like

That worked! I have never used the split function (or knew what it did) so that was the missing piece lol

Thank you so much for your help!

1 Like