Skip to main content

What I am doing here is using the javascript subscript method to get a character to use in a switch statement.

I noticed the switch statement is always going to default so I stuck a logger.info snippet into the workflow and apparently substring is returning a number instead of a character.

 

 

 

 

Clearly I am doing something wrong. 

Halp.

Ugh. It’s busted.


Ok it looks like what is happening is that is the clientName/clientName is not being treated as a string. 

 

 


Hey @chrisknows , let me see if I can get some internal folks to chime in.


You can close this one. 

It’s returning a lowercase “L” which I thought was a one.

 

The mistake I was making was zero based index vs 1 based index. 

I realized when tried doing clientNamel3] instead of using substring.

It worked when I did clientNamel2], I wanted the third character in the string, but of course for a zero based array that is the second element not the third.

 

Silly errors wasting time.

 


That’s gotta be the 3rd or 4th time you solved your own issue 🤣

Figures that the only one who could fix an issue you had is….well, YOU!

glad you got it cracked!


Sometimes all I need is a sounding board. 

Working from home alone has it’s downsides 😂


Reply