Use this function/procedure to add a form to your form set and still have the form's section triggers evaluated.
For instance, you can use this function when users add forms to a policy and want endorsements to print in a sequence unique to each transaction. The RunTriggers rule evaluates each form level trigger and adds the form to the set using the order specified by the forms list in the MRL.
If you use an import file rule, the system adds the forms in the order specified by the associated input. If you have a situation where you want to control the form addition, but the data is not an import style file, you may want to use this function to do the form additions.
This function adds a form to the form set and evaluates the form's section triggers. Section trigger and recipient processing are then performed as if the form had been triggered by the RunTriggers rule.
For each triggered form, the form's section triggers are evaluated. If a section trigger returns a zero (0) count, the system removes the section from the form. If the section trigger returns a multiple count, the system inserts additional sections into the form until the section count matches the trigger count.
If the TriggerForm function is executed before the standard section processing rule (RULStandardImageProc), the standard field rules are also be executed on the inserted sections.
Here’s an example. Assume these entries are in your AFGJOB.JDT file:
;PreTransDAL;;TriggerForm("Myltr1");
;RunTriggers;;
;PreTransDAL;;TriggerForm("Myltr2");
;PreTransDAL;;TriggerForm("Myltr3","Myltr1");
;PreTransDAL;;TriggerForm("Myltr4",,"LB2");
This form |
Is added |
Myltr1 |
To the beginning of the form set (before any forms triggered by the RunTriggers rule) |
Myltr2 |
After any forms triggered by the RunTriggers rule |
Myltr3 |
After the first occurrence of Myltr1 |
Myltr4 |
To the group named LB2 |
Note | You can also use the AddForm procedure to add a form to a form set. The difference is TriggerForm also tells the system to evaluate the form’s section triggers, where AddForm does not. |
TriggerForm (Form, Insert, Group)
Parameter |
Description |
Form |
Enter the name of a form in the specified group. |
Insert |
Enter the name of a form after which the new form should be inserted. The default is to append after the last form in the group. |
Group |
Enter the name of a group to contain the specified form. The default is the current group. |
The system optionally returns one (1) on success or zero (0) on failure.
This procedure adds a copy of the specified form to the document set. The form named must be a valid form in the specified group. You cannot add a form defined for one group into another group. You can specify the name of the form you want to insert using the occurrence indicator.
If you include the Group parameter, make sure it references a group defined in the Application Definition (BDF) file.
Use this procedure with resources created using Documaker Studio and processed via the GenData program. If you use this procedure outside of GenData, such as with GenPrint or the entry system, or if you use it with legacy resources, the TriggerForm function will not cause the system to evaluate section triggers. In that scenario, you simply get the functionality of the AddForm procedure.
Here are some examples:
Procedure |
Result |
Explanation |
TriggerForm("FormA") |
1 or 0 |
Add FormA after the last form in the current group and evaluate FormA’s section triggers. |
TriggerForm("FormA", "FormA\1", GRP") |
1 or 0 |
Add FormA after the first occurrence of that form within the named group and evaluate FormA’s section triggers. |
© Copyright 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices