Is is possible to use Eval statement?

Have tried it but no luck.

def isThreshold = eval("isThreshold1") generates this error.

groovy.lang.MissingMethodException: No signature of method: user_app_garyjmilne_Tile_Builder___Attribute_Monitor_1026.eval() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [isThreshold1] Possible solutions: every(), equals(java.lang.Object), every(groovy.lang.Closure), each(groovy.lang.Closure), wait(), run() on line 1403 (method mainPage)

Try evaluate instead. I am using that in a driver and it works. Unless that does not do the same thing?

That worked, but strangely the code became very slow using a loop with eval vs repeating the code 5 times with hardcoded variables.