Efficient way to change state abbrev to full name


#21

@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


#22

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.


#23


#24

try this:

note the trailing comma is needed.


#25

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…


#26

thought OP was asking for this?


#27

Look at his message variable and clarified request in post 3


#28

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


#29

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 :slight_smile:


#30

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