I can create dynamic variables where varname is a string like var_1 var_2 var_3 etc.
and populate them through an input (name: varname, ....
This works fine
But how could I retrieve the value of a dynamic variable whose name (varname) is in a string into another ordinary variable ? Ideally a setting..
General idea like this but varname is the dynamic name of the variable as a string
MyVar=settings?.varname or
MyVar = varname
MyVar=var_1 <<< works fine of course
There may be other ways, but settings is a map. I like to use settings["myVarName"]. With a Groovy String, you can use things like "myVar$mum" besides just "myVarName".