substring

substring

I am needing to separate the characters in a zipcode, so I found the substring function and tried to use it to fill a field named region with just the first characters. However, when I wrote the line below in the free-flow scripting for on user input of the zip field, but it said "Not able to find 'substring' function". Is there something wrong with the script itself, or in the way I did it?

region=input.zip.substring(0,2);