Skip Ribbon Commands
Skip to main content
When documents in ContactsLaw undergo registration or creation, they are assigned descriptive names. The system has the capability to automatically generate these descriptions, based on a user-defined expression.
 
The document description can contain the following elements:
  • Static text (i.e. a phrase that will always appear in the field)
  • Properties of the document (e.g. contacts, dates, directionality, etc)
  • Properties of the file (e.g. parties, members, court, matter, etc)
  • Conditional expressions
  • Workflow variables (populated by document workflows)
  • Grammar modifiers (e.g. pluraliser, possessive apostrophe)
The nature of the expression can change according to various attributes of the document, such as the direction.
 
This expression can be defined for each document type, in the following ways:

Expression editor

The simplest way to build the document description expression is to use the description editor. This arranges the components of the would-be description into a tree and allows sections to be added, edited and moved around the structure. In the tree, bold text indicates content (or a representation of content) that will be readable in the resultant description. Normal weight text a indicates decision-making element, such as how to behave according to the direction of the document.

Expression syntax

Description-building expressions can also be written manually. They use a standard recursive syntax:
 
Literal text may appear anywhere in the expression. To include dynamic/evaluated content, square brackets are used to delimit the name of the element. Where an element has options or control flow, parentheses and commas are used (standard function notation).
 
The elements available are:
Role:name-of-role(name-format)
Party:name-of-role(name-format)
Representative:name-of-role(name-format)
Judiciary:
name-of-role(name-format)
Member:
name-of-role(name-format)
Displays the name of a role on the document or file. You can omit the parentheses and name format if you want to use the default, shortened name format.
 
RoleOnFile:name-of-document-role
This element looks up the role held on the file by a particular contact on the document.
 
{Client|BillTo|Court}(name-format)
Displays the name of the client, bill-to contact or court on the file.
 
ClientRole
Displays the role held by the client on the file.
 
Date:name-of-date(date-format)
Displays one of the dates on the document. You can omit the parentheses and date format if you want to use the default date format.
 
Attribute:name-of-attribute(expression-if-set, expression-if-not-set)
Conditional expression which determines whether a particular attribute (e.g. final, discoverable, etc) is set on the document, and evaluates a different subexpression based on the presence of the attribute. You can omit the comma and the sub-expression for when the attribute is not set if you do not want to generate content in this case.
 
Direction(expression-if-incoming, expression-if-outgoing)
Conditional expression which evaluates a different subexpression depending on the direction of the document. You can omit the comma and the sub-expression for when the document is outgoing if you do not want to generate content in this case.
 
Enclosures
Comma-separated list of the document's enclosures.
 
Subject
The original subject (if the document is an e-mail) or description (prior to cataloguing). On outgoing documents, this value can be overridden by the template.
 
Title
The title of the document, obtained from its metadata. Varies according to the format of the document. This value may be empty.
 
Source
A term describing the origin of the document; for example, fax or e-mail.
 
InReplyTo
The document that the current document is in reply to.
 
DocumentType
The name of the document type to which the expression belongs.
 
'
Adds a possessive apostrophe to the preceding subexpression. Uses English grammar rules.
 
s
Converts the preceding subexpression into a plural, using English grammar rules. Assumes the subexpression is not already in plural form.
 
Product(product-format)
Displays the name/code of the product associated with the document or, if absent, the default product on the file.
 
Field:name-of-field
The value of a workgroup field on the file.
 
Doc#
The document number.
 
Equals(first-expression, second-expression, result-if-equal, result-if-different)
Conditional expression that compares the results of two subexpressions and evaluates a different subexpression according to whether they are equal.
 
File#
The file number.
 
Workgroup
The name of the file's workgroup.
 
Department
The name of the department in which the file's workgroup is located.
 
Coalesce(first-expression, second-expression)
Conditional expression that returns the first, non-empty (after evaluation) subexpression.
 
Exists(test-expression, result-if-exists, result-if-blank)
Conditional expression that tests a subexpression and returns a different subexpression depending on whether it is empty (after evaluation) or not.
 
Evaluate(formula)
Allows you to perform simple mathematical/date calculations and insert the result into the description.
 
Assign(variable, expression)
For use in formulas (above). Allows you to assign the result of an expression to a variable, which you can then use in a formula.
 
$variable-name
The value of a workflow variable. Note that variables can be populated in two ways; by creating a document workflow and mapping output directives from the previous activity into document creation or cataloguing -or- by manually adding directives to tasks using the Advanced tab.

Example

The following expression:
[Source] [Direction(from [Role:Author], to [Role:Addressee])] re: [Subject]
Returns the following description if the document is an incoming fax from John Citizen whose original description was "Statement of Claim":
Fax from J Citizen re: Statement of Claim
Or, returns the following description if the document is an outgoing e-mail to Jane Doe whose subject line was "Your account":
E-mail to J Doe re: Your account

Dependencies

Document description expressions refer to roles, dates, fields and other elements by their names. For this reason, changing the name of a role, date, etc will invalidate any document description expressions that depend upon them. ContactsLaw will not automatically update the expression.