Expression 'runScript' fails to run script

Using 7.6.3 in Windows7-64bit.

I defined in system tags an expression tag.

If in Expression property I do

runScript("var1=5")

the value tag is: 5.

If in Expression property I do

runScript("var1=5\nvar1=6")

the value tag is: 5.

If in Expression property I do

runScript("var1=5\nVar1=Var1+6\nreturn Var1")

the value tag is: null.

Am I doing something wrong?

It seems that return doesn’t work in the runScript expression.

Even though you can use the newline character ( \n ) to run additional lines of code, it looks like the runScript expression is only returning the evaluation of the first line of code.

I believe you can use return if your first line is a function definition, but I haven’t tested that.