Blockly - error for getting position of a text in item state

After you have assigned your Item to your variable, and before you do your substring check, use the ‘append’ block from the Text section to append a zero length string to the variable.

This will force the variable into a string type.

See this example:

2 Likes