Forum Discussion

Manfred_F's avatar
Manfred_F
Regular Contributor
10 years ago
Solved

get alias object via string

Hi,

in ODT, I want to define the required alias as Array element  in the data section. This would be useful to separate data from code.



I can put the Aliasname as string there.

In my test procedure, can I get the corresponding Alias object from the string?



Regards,



Manfred


  • Hi Manfred,



    With JScript you can do that with something like this:



    eval(aliasArray[index] + ".someFunction(arg0);");



    Sincerely


1 Reply

  • simon_glet's avatar
    simon_glet
    Regular Contributor


    Hi Manfred,



    With JScript you can do that with something like this:



    eval(aliasArray[index] + ".someFunction(arg0);");



    Sincerely