guido_riedweg
11 years agoNew Contributor
Replace Runner.CallMethod in Code Expression
Hi,
I want to concat two strings in a code expression and assign the value to a variable. One string is a constant, while the other string is the result of a script method. I achieved this by using the operation Set Variable Value, setting Mode to Code Expression and setting Value to aqString.Concat("MyString_", Runner.CallMethod("Unit1.getUniqueString")).
This works fine, but the documentation for Runner.CallMethod says that this method is obsolete. Is also says that the method should be called directly instead. I've tried to rewrite Value to aqString.Concat("MyString_", Unit1.getUniqueString), but this does not work (the variable value will be completely empty).
How can i call a script method from a code expression, without using Runner.CallMethod?
Best regards
Guido
I want to concat two strings in a code expression and assign the value to a variable. One string is a constant, while the other string is the result of a script method. I achieved this by using the operation Set Variable Value, setting Mode to Code Expression and setting Value to aqString.Concat("MyString_", Runner.CallMethod("Unit1.getUniqueString")).
This works fine, but the documentation for Runner.CallMethod says that this method is obsolete. Is also says that the method should be called directly instead. I've tried to rewrite Value to aqString.Concat("MyString_", Unit1.getUniqueString), but this does not work (the variable value will be completely empty).
How can i call a script method from a code expression, without using Runner.CallMethod?
Best regards
Guido