Saturday, May 19, 2012

WHEN-FORM-NAVIGATE

To pass information when navigating from one form to another when both forms are
already open, use the WHEN-FORM-NAVIGATE trigger. You do not code this trigger
directly; instead pass the information through global variables.
To use this trigger, populate a global variable called
GLOBAL.WHEN_FORM_NAVIGATE with the name of a user-named trigger. When a
form is navigated to, this trigger fires.
The WHEN-FORM-NAVIGATE trigger fires upon programmatically navigating to a
form using the GO_FORM built-in. Accordingly, this trigger is referenced into all forms.




========

WHEN-FORM-NAVIGATE

You cannot modify this referenced trigger. It enables certain standard behaviors, such as normalizing a minimized form when it is navigated to.
To make use of this form event, populate a global variable called GLOBAL.WHEN_FORM_NAVIGATE with the name of a user-named trigger. Usually you populate this global immediately before issuing a GO_FORM.


========


Querying an Item
It often makes sense to navigate to a form and query on a specific item. For example,
suppose you have an Order Entry form ORDERS and a Catalog form CATALOGS. You
want to navigate from the ORDERS form to CATALOGS and query up a specific part
number.
• In the ORDERS form, create a global variable called GLOBAL.PART_NUMBER,
and populate it with the value you want to query.
• In the ORDERS form, create a global variable called
GLOBAL.WHEN_FORM_NAVIGATE. Populate this variable with the string
"QUERY_PART_NUMBER".
• Create a user-named trigger in the CATALOGS form, "QUERY_PART_NUMBER".
In this trigger, enter query mode by calling EXECUTE_QUERY.
• Create a PRE-QUERY trigger in the CATALOGS form that calls
copy('GLOBAL.PART_NUMBER, 'PARTS_BLOCK.PART_ NUMBER'). Then call
copy('','GLOBAL.PART_NUMBER'). When there is a value in
GLOBAL.PART_NUMBER, it becomes part of the query criteria.


===============

LINK for GLOBAL Variable

Global Variables :-> 

No comments:

Post a Comment