Asset: Difference between revisions
No edit summary |
No edit summary |
||
Line 26: | Line 26: | ||
* [[Workgroup]] | * [[Workgroup]] | ||
* [[Custom Field]] | * [[Custom Field]] | ||
=== Configuration Assets === | |||
In addition to assets which refer to resources in ContactsLaw, you can also add assets for the purpose of '''configuration'''. These are a set of values defined within the template or process itself. | |||
For example: You may want users to be able to quickly change the formatting for all date/time values in a template. You add a configuration asset with a property named ''DateFormat'', which you then refer to in any expression which formats a date value. You may set the value of this property to a particular date format (e.g. one that includes the day of the week); but you can quickly cause all dates to be formatted differently, simply by changing this single property. | |||
== Properties == | |||
Each type of asset has a different set of properties, to which [[Expression|expressions]] can refer. | |||
For example, some of the properties available on contact assets include ''FirstName'', ''LastName'' and ''BirthDate''. | |||
Properties can have different types of values, such as: | |||
* '''Text''' (plain or with [[Markdown]] formatting) | |||
* '''Number''' | |||
* '''Date/time''' | |||
* '''Boolean''' (yes/no) | |||
You may need to use [[Expression#Function Reference|functions]] to convert between different types of values, e.g. to format a date value so it includes the name of the month. | |||
A subset of the properties can also be updated by [[Workflow:Process|processes]]. (Some properties cannot be set by users, or cannot be meaningfully updated.) |
Revision as of 13:21, 3 May 2024
Assets are the mechanism through which expressions refer to resources within ContactsLaw. They can be used in document templates, processes, description specifications and many other areas of the software. Each asset has a name (which distinguishes it from other assets) and a type (which determines the data that can be accessed through it).
Assets are also hierarchical, e.g. an address asset belongs to a particular contact asset. This avoids the need to separately specify how to obtain the address. Relationships between assets may be mandatory (e.g. between addresses and contacts) or optional (e.g. between contacts and matters).
Assets can resolve to multiple resources; for example, if a contact asset maps to a role on a matter, and there are 3 contacts in that role, then the asset will be resolved 3 times. Whenever an expression refers to an asset, it may yield zero, one or multiple values (functions are provided to deal with this). Mechanisms such as repetition blocks (in document templates) can be used to manage complex hierarchies of assets that resolve to multiple resources.
Types
Types of assets include:
- Contact
- Matter
- Invoice
- Invoice Item
- Time Record
- Time Record Line Item
- Invoice
- Document
- Image
- Fragment
- Transaction
- Transaction Line Item
- Account
- Workgroup
- Custom Field
Configuration Assets
In addition to assets which refer to resources in ContactsLaw, you can also add assets for the purpose of configuration. These are a set of values defined within the template or process itself.
For example: You may want users to be able to quickly change the formatting for all date/time values in a template. You add a configuration asset with a property named DateFormat, which you then refer to in any expression which formats a date value. You may set the value of this property to a particular date format (e.g. one that includes the day of the week); but you can quickly cause all dates to be formatted differently, simply by changing this single property.
Properties
Each type of asset has a different set of properties, to which expressions can refer.
For example, some of the properties available on contact assets include FirstName, LastName and BirthDate.
Properties can have different types of values, such as:
- Text (plain or with Markdown formatting)
- Number
- Date/time
- Boolean (yes/no)
You may need to use functions to convert between different types of values, e.g. to format a date value so it includes the name of the month.
A subset of the properties can also be updated by processes. (Some properties cannot be set by users, or cannot be meaningfully updated.)