Use this calculation type to create a form stack definition on a master form.
A form stack is a group of data forms of the same type. For example, a form stack of vendors, or a form stack of unpaid vendor invoices. Think of a paper based office with everything on paper forms. To make a report listing all vendors the first step would be to get a stack of all the vendor forms and then process the stack of forms.
Form stacks are used several places in Formever:
- in report designs
- in export designs
- in definitions (process a form stack, get a form stack)
- in field procedures and form procedures
You create form stacks as definitions on the back of master forms. Form stacks defined on the back of a master form (other than the Organization master form) are contextual. For example, on a vendor form a form stack of vendor invoices consists of only those invoices associated with the specific vendor data form. That is because vendor invoices have a form reference to the vendor form.
By default every master form has an all data forms form stack. These are indicated with a "*" preceding the form name. E.g. ‘*Vendor’ is a stack of all Vendors; or ‘*Vendor Invoice’ is a stack of all vendor invoices from all vendors. An all data forms stack is not constrained by context. Or if you want to you can think of the entire system as the context.
Configuration
These are the basic steps to configure this calculation type. Formever will lead you through as you point and click.
- Label the definition
- Select the base form stack
- Configure form selection criteria
- Configure void form handling criteria
- Configure form sorting treatment
- Configure form gathering
Step 1 - Label Definition
Give the definition a descriptive label. This doesn’t have to be done first. But make sure you provide a descriptive label before filing the master form. Since definitions are used throughout the system a descriptive label is recommended.
Doing it first serves as a reminder of what you are trying to accomplish as you configure the definition.
When a form stack is needed by a procedure, definition or design Formever will only present form stacks as choices in the Form Stack Chooser, so it is not necessary to include the word ‘stack’ in the label. But if you want a reminder you could include ‘stk’ at the beginning or end of the label. E.g. ‘Active Departments stk’
Step 2 - Select Base Form Stack
Begin by selecting a initial stack of forms. This could be:
- a default all forms stack
- a previously defined form stack
- a referenced or referencing form
Step 3 - Configure Form Selection Criteria
Once the base form stack is chosen specify how to select the desired data forms. For example, you want a stack of a vendor’s unpaid invoices. You start with a base stack of the vendor’s invoices. Then apply selection criteria to only keep those that have an unpaid balance.
Selection criteria allow you to:
- keep all forms (default)
- keep certain forms
- discard certain forms
Step 4 - Configure Void Form Handling Criteria
In Formever data forms can not be deleted. They can however be voided and consequently are initially included in a form stack. Rarely do you want to process void data forms so they should be excluded from a form stack.
The default behaviour is to exclude void data forms from the form stack – shown in the above image. This can be changed to include void data forms in the stack by clicking on the text.
Step 5 - Configure Form Sorting Treatment
The data forms in a form stack may not be in the order you need for the task you want to use it. Change the order by sorting the stack.
The sort is based upon a field selected using the Field Chooser. The field might be on each data form in the stack or on another form associated with each data form.
The sort order can be either ascending or descending order.
The default behaviour is to not sort the data forms in the form stack.
Step 6 - Configure Form Gathering
Use Gathering to get a form stack of detail lines from the data forms in the selected stack (step 2). For example, to find all the items purchased by a customer gather the detail lines from all that customers invoices.
If no detail lines are accessible this will be indicated with a ‘no list fields’ message (image above). If there are accessible detail lines then you have the choice to gather or not gather detail lines. If you select to gather detail lines then choose a detail lines field using the field chooser.