Loop through line items
Scenario
Blaine and Fred are employees of ABC company. Blaine calculates the values entered in the line items and compares them with the amount that has been entered for the invoice amount. If the line item total does not match the invoice total, then Blaine sends it to a predetermined step for a correction. On this step, Fred can override the difference, or resolve the issue causing the difference. If the issue is resolved, the line item total is rechecked against the invoice total. When the totals match, the invoice is approved for payment.
Prerequisite
Forms are scanned into FileBound. Any user that is assigned to a group with the Workflow Initiation right can route a document through a workflow process.
Workflow design and configuration
The workflow process includes two Standard steps, two Update Value actions, two Custom Action stencils, one Decision flow control, and one Loop flow control. During workflow initiation, the set total step is set to zero.
Stencil: Set Total
On this step, a variable for the route path is created. The variable is called “total” and set to “0”. This step sets the initial line item total to 0.
The following attributes are applied to the step:
- Stencil type: Custom action
- Step information: Step name='Set Total = 0'
Stencil: Find Line Items
You can use this stencil to find line items within a file routed through the workflow process. This stencil loops through each line item and routes the document to the total line items step.
The following attributes are applied to the step:
- Stencil type: Loop flow control
- Step information: Step name=’Find Line Items’
Loop Settings properties
For information on Loop Settings properties, see Loop stencil.
Stencil: Total Line Items
Each line item of an invoice is sent down the "For Each" connection. Within the Total Line Items stencil, the line item total is stored in the “Total” index field. The value of the “Total” index field is stored within a variable called “livalue”. The value of the “livalue” variable is added to the value of the “total” variable (The “total” variable stores the route path information as set in the step Set Total). When there are no more line items, the document is sent down the "Done" connection.
The following attributes are applied to the step:
- Stencil type: Custom action
- Step information: Step name=’Total Line Items’
- Assign to user: Blaine
Stencil: LI Don’t Match Inv Amt.
This step is assigned to Fred. Fred can override the difference, or resolve the issue causing the difference. If the issue is resolved, the documentation notes are cleared and the line item total is rechecked against the invoice total. The documentation notes are cleared in the Remove Doc Notes step. When the totals match, the invoice is sent to the Pay Invoice step.
The following attributes are applied to the step:
- Stencil type: Standard step
- Step information: Step name='LI Don’t Match Inv Amt.'
- Assign to user: Fred
Menu