HI,
I have a web form a client can fill out that comes to email. I do not control this form, it is by a 3rd party vendor. They do not enforce State formats, ie, VA,va,Virginia, etc.
I have a flow that I had working until the word Virginia changes to VA or is missing totally.
Example: 5600 powell grove dr midlothian va 23112
I had it working if it were formatted like this:
5600 powell grove dr midlothian Virginia 23112 with these splits:
trim(split(split(body('Filter_array')[12],' Virginia')?[0],' ')?[sub(length(split(split(body('Filter_array')[12],' Virginia')?[0],' ')),4)])
trim(split(split(body('Filter_array')[12],' Virginia')?[0],' ')?[sub(length(split(split(body('Filter_array')[12],' Virginia')?[0],' ')),3)])
trim(split(split(body('Filter_array')[12],' Virginia')?[0],' ')?[sub(length(split(split(body('Filter_array')[12],' Virginia')?[0],' ')),2)])
Now I see that will not work.
I can get the Zip code. Last(split(outputs('Full_Address'),' '))
(Full Address is a compose : trim(split(body('Filter_array')[12], ':')[1]) )
What code will help me go:
1 word left of the Zip for the State
2 word left of the Zip for the City
Then, throw way those 3 values , leaving the street address?
Appreciate suggestions.
Thanks!