cancel
Showing results for 
Search instead for 
Did you mean: 

MID Function throwing Syntax error

Hi, just installed vresion 6.10 and the MID function for text is not working. 

Input
Mid("Stephanie", 1, 2)

Error:
BluePrism.AutomateProcessCore.InvalidExpressionException: Syntax error. The token '2' is invalid. Please check the case of your operators (eg 'or' versus 'OR') and check that your functions use brackets after the function name eg Now(), eg Len("abc").
at AutomateUI.ctlProcessExpressionBuilder.TestExpression(String localExpr)
1 BEST ANSWER

Best Answers

John__Carter
Staff
Staff
Hi Stephanie - I had this issue and found a (not very nice) workaround is to add spaces on both sides of the commas, like this:

Mid("Stephanie" , 1 , 2)

I think problem this due to langue/locale settings where the expression validator gets confused by the commas, and I have raised a bug fix with our product team. In my case I eventually realised that on the BP log in screen I had my language set to English (Europe), and when I set it back to English (United Kingdom) the problem was gone.
37108.png

View answer in original post

2 REPLIES 2

John__Carter
Staff
Staff
Hi Stephanie - I had this issue and found a (not very nice) workaround is to add spaces on both sides of the commas, like this:

Mid("Stephanie" , 1 , 2)

I think problem this due to langue/locale settings where the expression validator gets confused by the commas, and I have raised a bug fix with our product team. In my case I eventually realised that on the BP log in screen I had my language set to English (Europe), and when I set it back to English (United Kingdom) the problem was gone.
37108.png

Thank John, agree it must be the regional settings, all my full stops (for timeout times) changed to commas in my actions when I imported the process to the new VM. My work around was less nice, I stored the number values in number Data Items, which fixed the issue. Will see if I can change the regional settings.