cancel
Showing results for 
Search instead for 
Did you mean: 

Semicolon - Syntax error

Anonymous
Not applicable
Hello, we have encountered following runtime error: "ERROR: Internal : Failed to evaluate expression in row 1 of Write Stage 'Vlož nové GSM' on page 'Akce v adresní knize' - Syntax error. The token ';' 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")." When we try to validate the expression in expression chooser the expressions seems to be valid. Expression is: Replace([Nahradit.Nove]; Left([Nahradit.Nove]; 4); Left([Nahradit.Nove]; 4)&" ") Any suggestions what may be causing this error?
2 REPLIES 2

Denis__Dennehy
Level 15
I recommend using the expression builder available at the bottom of calculation and decision properties screens. That will show you the correct syntax to you.

JukkaSalovaara
Level 3
I realize this question is old by now, but it still applied to BP 6.3.1.7631: The expression syntax is valid, except that the function argument separator depends on the system locale. Sometimes you have to use a semicolon and sometimes a comma is needed. In principle it could also be any other character if the locale said so. And complicate things further, this behavior does not always seem to be consistent between different functions in Blue Prism. But in any case, the present expression is valid if the locale is correct (you can try it out by substituting some constant string in place of the collection reference). For example: 1. Set locale to en-US 2. Try this expression: Replace(""test-string1234""; Left(""test-string1234""; 4); Left(""test-string1234""; 4)&"" "") 3. The result is ""The token ';' is invalid."" 4. Set locale to fi-FI (that's what I use here in Finland) 5. Restart Blue Prism 6. Try the same expression: Replace(""test-string1234""; Left(""test-string1234""; 4); Left(""test-string1234""; 4)&"" "") 7. Now it's valid and you get ""test -string 1234"" a the result