You now have two options for assigning JavaScript functions to events of different components.
You can proceed as with all other action functions and manually create a new action function for a specific event or component.
You can now select SCRIPT as the command for this action function. In the dropdown box, you will see all available functions from your defined JavaScript that match the pattern (no parameter or only args parameter).
However, if you want to apply a JavaScript function to several events of different components, there is a simpler option.
To do this, call up the assignment screen, which you can also access via the Project Explorer at “Scripting“ /
“JavaScript” /
“Assignment“ .
The assignment screen is divided into two areas:

Area 1: shows an overview of all JavaScript functions that are suitable as action functions. Select a function here that you want to assign to events.
Changes to function names do not automatically affect functions that have already been assigned. These must then be linked again.
Area 2: lists pages that are currently open and the components on them. Events and functions can be added and deleted here using the context menu (right mouse button).
Caution: If an event is deleted at this point, this affects all action functions that are assigned to this event.
As only script action functions are displayed here, it is therefore possible that there are other action functions behind an event that are not visible here, action functions that are not visible here.
These would be lost when the event is deleted.
To assign a JavaScript function to several events at once, it must first be selected in area 1. The “Trigger” button can then be pressed.
The following dialog appears:
The function name of the selected function is displayed at the top. Below this is a dropdown box with events. Depending on which event was selected, the list of components changes in the lower part, as not all components have the same events.
If the “OnVariableChanged” event is selected, a list of all variables available in the project appears.
To filter the list further, you can use a name filter as well as the option of only displaying components that either already have an assignment or do not.
All components that have a tick have already linked this function to this event. If a tick is removed, the link is removed when saving.
New links can also be created the other way round.

