I have created many functions in the event sheet, and I want to call them dynamically by fetching their names from an array. I have a JSON array that is converted to a local array using AJAX, and the array contains the names of the functions that I want to call. For example, one of the functions is called “MyRoseFunction”.
To call the function by name, I have added a JavaScript script in the action area of the event sheet, and I have used the runtime.callFunction method. When I pass the function name as a string, like this:
runtime.callFunction("MyRoseFunction");
It works fine and the function is executed. However, when I try to pass the function name as an expression using the At method of the array object, like this:
runtime.callFunction(MyArray.At(5,2));
It doesn’t work. Please help.