The Interactive Forms Framework allows you to create custom table definitions which can be used in forms, documents and on the file itself.
In order to use a custom table in your forms, you will need to:
- Create a workgroup field in which to store the contents of the table on each file. You must set the field type to 'Table'.
- Create the table definition (via the Manage Tables link on the forms management screen). Under 'Association', you must add the workgroup field you created in the previous step.
- On your form, place a Table control and set its binding to the workgroup field associated with the table.
Note: Step 3 is optional; you can create tables whose values are collected during file creation or via the summary screen only. These can still be used in document production. |
Although tables must be associated with a particular workgroup field, they may be used in other workgroups as long as the same field is available there.
Columns
A table definition is comprised of a set of columns. Each column has the following properties:
- Name - Assigned automatically, but can be overridden. You refer to columns in rules and document templates by their name. Changing the name once it has been used elsewhere will cause those references to stop working.
- Heading - The text displayed on the column header.
- Type - The type of value containing within the column; e.g. text, whole number, decimal number, date, etc. The type determines the allowable values as well as their formatting.
- Shrink to fit - Whether the column should shrink to fit its contents. If not selected, the column will expand to fill the available horizontal space in the table.
The Unique ID type automatically assigns a unique number to each row in the table. This is useful if you want to work with individual entries directly (e.g. using a table entry record on a form).
If columns are changed after values have already been stored on files, the existing data may no longer be valid. You can, however, add additional columns to an existing table with no adverse consequences.
Rules
You can reference values in a table within a rule by selecting the associated workgroup field. The editor will recognise that the field maps to a table and will present you with the list of columns to choose from. Due to the fact that a table will contain multiple values per column, you must also choose an aggregation function to transform those values into a single figure that you can use in your rule.
You can choose from the following functions:
Sum - Adds numerical values together (does not work on text or date columns).
Count - Counts the number of rows in the table.
Average - Averages numerical values. Blank cells are counted as zeroes.
Minimum - Outputs the smallest numerical value.
Maximum - Outputs the largest numerical value.
First - Always outputs the first value.
Single - Outputs a value if it is the only value in the column; otherwise outputs nothing.
Document production
Once a table is associated with a particular workgroup field, the field will appear as a group in the document template editor, under which you will find the names of the columns in the table. When inserted into a document, all values (including blanks) in that column will be included; this allows you to recreate the table in your documents. You can also apply formatting rules to one or more columns to transform the values; for example, adding numbers together to produce a total.
See also
Interactive Forms Framework