Once you’ve typed the full expression with all states, please share so others don’t need to do the hard work as well 
Efficient way to change state abbrev to full name
Just an extra thought, and I’m not 100% if this will be a problem or not… but it’s possible that the replace function might change words containing the abbreviations unintentionally, such as changing the word ‘are’ to ‘Arkansase’
Might be worth doing a few tests before you spend time typing out the whole lot!
If it does cause a problem, maybe replace the leading and trailing spaces as well:
replace(message, ‘ IL ’, ‘ Illinois ’, ‘ AL ’, ‘ Alaska ’, ‘ AR ’, ‘ Arkansas ’)
One more approach, you can try a nested ternary… (short list below)
(sC == “AL” ? “ALABAMA” :
(sC == “AK” ? “ALASKA” :
(sC == “AZ” ? “ARIZONA” :
(sC == “AR” ? “ARKANSAS” :
(sC == “CA” ? “CALIFORNIA” :
(sC == “CO” ? “COLORADO” :
(sC == “WY” ? “WYOMING”)))))))
What’s ‘sC’?
The message string contains more than just the abbreviated state, so I don’t see how a ternary operator could pick out the correct part to work on?
this should return the long form of state:
define string shortState = 'AL,AK,AZ,...'
define string longState = 'Alabama,Alaska,Arizona,...'
arrayItem(indexOf(shortState, lookupState), longState)
Oh, I was feeding it the state code == sC
And there’s @bangali’s method, Lists which I have not learned very well yet 
before trying that one please check if indexof supports comma delimited string 
this does not actually use lists just comma delimited strings
@bobbles they are dynamic. They are my api key for google maps, 2 different ones, and a dynamic one for my home gps latitude and longitude
yeah indexof may not support comma delimited string try this:
define string shortState = 'ALAKAZ…'
define string longState = ‘Alabama,Alaska,Arizona,…’
arrayItem((indexOf(shortState, lookupState) / 2), longState)
this will require checking none of the short state cdoes are inadvertently generated by stringing them together.
I’m not sure how arrayIyen can help in this case… the OP wants to replace the abreviation which is mixed up within a longer string of text generated from elsewhere…
I think I almost got it. It may not be most beutifu; but I will post my final working and then maybe one of the fine people here can help me get it effecient
thought post 6 was later and more updated.
doesnt matter though same principle applies.
used 3 lines instead of 2 for readability.
heres the one liner 
Ok guys. Thanks for the help.
Here is a green shot and a screen capture of the piston. It’s working as I need. Just a lot of manipulation to get the state on there rather than the abbreviation.
Any suggestions to make this even cleaner. I’m all ears






