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.
![](https://uploads-eu-west-1.insided.com/commvault-eu/attachment/3da8b8ff-c1b0-450c-80ef-aebf67e306d7.png)
![](https://uploads-eu-west-1.insided.com/commvault-eu/attachment/83540f13-7ed5-4067-809d-492356a69ba4.png)
![](https://uploads-eu-west-1.insided.com/commvault-eu/attachment/bef38d81-8be9-4062-89eb-fce26f5ac65e.png)
Clearly I am doing something wrong.
Halp.
Best answer by chrisknows
View original