Can anyone tell me why this formula is not working in netsuite?
SUBSTR({name}, 1) = ' '
The intent here is to use this to determine if our users entered any leading spaces in the name of a field and if so, the workflow action will trim them off.
This works for the last character (trailing spaces as well), but I'm not getting the result expected for the first character. SUBSTR({name}), LENGTH({name})) = ' ' works as expected, but the one where I specific index of 1 doesn't. I know that in netsuite, the base is 1 and not 0, so that's not the issue. I tested it as well looking for the specific character that I know is the start of the string and again, the formula resolved to false in my workflow history. So I'm not sure what's going on. Any ideas? What am i missing? Thanks!
EDIT: Nvm, figured it out. Apparently I need to have the substring length specified as well even though it's an optional criteria. Thought I'd share in case anyone else ran into the same issue. So, SUBSTR({name}),1,1) = ' ' works as expected.