Kbase P21019: General way to build reusable triggers for enabled browse columns
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
General way to build reusable triggers for enabled browse columns
FIX:
The example below shows how to use include files to build reusable triggers
Example: instead of a statement like:
"ON mouse-menu-click OF col-1, col-2, col-3 ... IN BROWSE browse-1"
where col-1, col-2 ... is a list with all enabled browse fields
you must define something more general using include-files:
{TRIGGER.i
"MOUSE-MENU-CLICK"
{&browse-name}
}
/* Trigger.i */
ON {1} OF {REPEAT.i {&fields-in-query-{2}}} IN BROWSE {2} /* Address */
DO:
MESSAGE "here must be run a copy procedure".
END.
/* repeat.i */
&if "{1}":U "":U
&then
{1}
&if "{2}":U "":U &then
, {repeat.i {2} {3} {4} {5} {6} {7} {8} {9} {10} {12} {13} {14} {15}}
&endif
&endif