Add Standard Procedure Calls

Top  Previous  Next

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:

MyProc(‘fieldname’,Action,1)

 

Code generated by the Local Business Rules Manager BINDs Action as follows:

BIND('Action',ThisWindow.Request)

 

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:

File Name

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.

 

Procedure Name

Enter the name of the procedure to be called. This name corresponds to "MyProc" in the example above.

 

Do It!

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.