Salesforce

How Do I Identify from Which Control an Event Was Triggered? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Identify from Which Control an Event Was Triggered? (Magic xpa 3.x)

An event handler can exist at a higher level than the task it is handling. A good example of this are event handlers in the Main Program, which can be universally used in any task in the project. If you want to query which control the user is parked on, you need to use the HandledCtrl() function.

Using HandledCtrl()

  1. Go to Expression Rules.

  2. Type:

    HandledCtrl()

    or, type Ha and press Ctrl+Spacebar, and the Auto Complete feature will fill in the rest of the function name for you.

Now you can use the control name to make decisions within the event handler. For instance, you could have a generic help system that responds to characters in the control name to call specific help files.

See also

The Online and Rich Client Samples projects (program LG15 and RLG15)

Reference
Attachment 
Attachment