A record represents an item from ContactsLaw (such as a contact or file) that is used on an interactive form.
In contrast to the fields used in document templates (where the complete list of available fields is always shown), you build the list of records incrementally, adding only what you need. This way, the process of relating records to other components on the form is greatly simplified.
Types of records
The types of records provided by the Interactive Forms Framework include:
- Contacts
- Files
- Tasks
- Fixed charges
Record structure
You add a record for each item you wish to create/update with a particular form. The record has a set of properties which consist of:
- Name - Used to identify the record in rules and bindings to controls.
- Comments - Further describes the use/purpose of the record, for the benefit of the user(s) designing the form.
- Directive type - Determines whether the record can be passed between forms, documents and other activities in ContactsLaw.
- Save mode - Determines whether the record is ultimately saved to ContactsLaw.
- Source - Determines whether the record is a new item to be created, or an existing item from ContactsLaw.
- Dependencies - Contains any other records in the design that relate to the record (e.g. related contact, contact with owns an address, etc).
- The remaining properties of a record reflect the properties of the corresponding item in ContactsLaw. These are arranged into categories.
Initially, the values for the properties of a record appear blank - this means that the default value (as determined by ContactsLaw) will be used. You do not have to set the values for any of the properties on a record unless the defaults are insufficient to save the record, or if you want to explicitly set the values for a new record. It is more common to set the properties of a record by binding them to controls on the form, or through the use of rules.
Records have their own internal hierarchy which reflects how the items are structured in ContactsLaw; for example, a record representing a contact's names (first, middle, last, etc) is separate from the record representing general information about the contact, and both records must be added to a form before the data can be accessed. Records are displayed in a tree to reflect these relationships. Some types of records can only be added once to a particular parent record (e.g. Correspondence preferences) while others can appear multiple times (e.g. Addresses).
Data types
Most of the properties on records can be set at design-time (on the record itself) and at run-time (using controls and rules on the form); however some properties with complex types (e.g. the Workgroup property on a file record, or the Branch property on a financial details record) can only be set at design-time. When editing these complex types in the
Form Designer, ContactsLaw will provide a dialog box to select the value, or open the
Search.
Sources
A record may represent a new item that is to be created, or an existing item in ContactsLaw.
For existing items, you must indicate where the record is loaded from; this is controlled by the
Source property for the record or, for some types of records, is determined by the parent record. The record may come from a
task, a specific item may be set at design time, or a
picker control may be added to the form to allow the item to be chosen interactively by the user. In the latter case, you must associate the picker with the desired record.
Directives
If the directive type is set to input then it will be possible to pre-populate the contact/file/document/etc represented by the record by passing the value from another activity in ContactsLaw. This can be done as part of a document workflow or process model. The name of the record will appear in the list of values that can be passed to the form activity.
When combined with the 'from task' record source, ContactsLaw will also allow you to set the initial contact, file and/or document for the record when creating a task for the form activity (via the task composer). Note that only one record of each type can be pre-filled in this way.
If the directive type is set to output then the form activity will make the value of the record available to the next step of the workflow. Additionally, you will be able to draw upon the values in document templates (if built upon completion of the form using an action). This also applies when passing information to a form that opens from a hyperlink.
Save modes
Depending on the design of your form, you can use
rules to control which records are ultimately saved to ContactsLaw. You can also specify this by manually setting the
Save mode property on the record. The available modes are:
- Always save (default) - The record is created (if new) or updated (if existing) regardless of whether it is complete, empty or partially complete.
- Save if exists - The record is only saved if an existing item is added (usually with a picker control). This prevents new records from being created and only permits existing items to be updated.
- Don't save - The record is excluded from saving and will be ignored when the user completes the form. This mode would usually be set by a rule; for example, if the user had not filled out certain optional fields.
See also
Interactive Forms Framework