|Navigation: Templates > Templates by Topic > Business Rules > Global Support >====== Add Standard Procedure Calls ======|
It is sometimes convenient to add code that implements business rules in a procedure. In this case, the rules entered in the Global Rules dialog window merely call the appropriate procedure. To make this structure more convenient to use, the Global Template provides a means by which a standard rules procedure call can be established for every column in a table.
The standard rules procedure call is:
Code generated by the Local Business Rules Manager BINDs Action as follows:
MyProc should be prototyped with three STRING parameters, passed by value, and a LONG return:
MyProc PROCEDURE(STRING Field,STRING Action,STRING HandleErrors),LONG
More information about standard rules procedures can be found in the ABC Library Reference PDF.
The Add Standard Procedure Calls dialog provides the following prompts:
Enter the name of the table for which you want to produce standard rule procedure calls. The ellipsis button can be used to display a list of available tables.
Enter the name of the procedure to be called. This name corresponds to “MyProc” in the example above.
Press the Do It! button to generate a rule for every column in the specified table. The template will not overwrite existing rules for a particular column.