This function works only for controls with an attached variable.
If the argument variable is attached to several controls (such as the Radio control), the function will return the index of one of the controls.
If the argument variable does not exist, or if it is not attached to any control, the function will return 0.
The control will be searched in the same task in which the variable is defined. Therefore, if the variable is defined in a parent task and attached to a control in a subtask, the function will return 0.
|