Workflow:Condition: Difference between revisions

From ContactsLaw Documentation
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Condition}}
{{DISPLAYTITLE:Condition}}
'''Conditions''' are tests that appear in certain types of [[Workflow:Process#Rules|rules]] and evaluate to either "Yes" or "No". They are the basis for making decisions in [[Workflow:Process|processes]].
'''Conditions''' are tests that appear in certain types of [[Workflow:Process#Rules|rules]] and evaluate to either "Yes" or "No". They are the basis for making decisions in [[Workflow:Process|processes]].
When a rule has multiple conditions, they are combined using Boolean logic:
* '''And''' - Both conditions must be met.
* '''Or''' - At least one condition must be met.
When complex logic is needed, you can also indent (place parentheses around) conditions to control the order in which they are combined. For example, <code>a OR b AND c</code> can be written as either <code>a OR (b AND c)</code> or <code>(a OR b) AND c</code>, both of which have different meanings.


== Expression ==
== Expression ==
Line 7: Line 14:
The condition is met when the expression evaluates to "Yes".
The condition is met when the expression evaluates to "Yes".


When a rule has multiple conditions, they are combined using Boolean logic:
== Custom Field ==
 
This condition gets the value of a [[Custom Field|custom field]] on an asset and compares it to the result of an [[expression]]. Only certain types of assets are supported.
* '''And''' - Both conditions must be met.
* '''Or''' - At least one condition must be met.


When complex logic is needed, you can also indent (place parentheses around) conditions to control the order in which they are combined. For example, "A or B and C" can be written as either "A or (B and C)" or "(A or B) and C", both of which have different meanings.
You can choose the type of comparison that determines when the condition is met:
* Field '''is equal to''' the expression
* Field '''is not equal''' to the expression
* Field '''is less than''' the expression
* Field '''is less than or equal to''' the expression
* Field '''is greater than''' the expression
* Field '''is greater than or equal to''' the expression


== Document ==
== Document ==
Line 34: Line 45:


== Ledger Balance ==
== Ledger Balance ==
This condition checks the balance on a [[ledger]] (or [[account]]) and compares it to an [[expression]].
This condition checks the balance on a [[ledger]] (or [[account]]) and compares it to the result of an [[expression]].


You can choose the type of comparison that determines when the condition is met:
You can choose the type of comparison that determines when the condition is met:

Latest revision as of 16:47, 11 July 2025

Conditions are tests that appear in certain types of rules and evaluate to either "Yes" or "No". They are the basis for making decisions in processes.

When a rule has multiple conditions, they are combined using Boolean logic:

  • And - Both conditions must be met.
  • Or - At least one condition must be met.

When complex logic is needed, you can also indent (place parentheses around) conditions to control the order in which they are combined. For example, a OR b AND c can be written as either a OR (b AND c) or (a OR b) AND c, both of which have different meanings.

Expression

This is the most common type of condition, also the most flexible. It simply consists of an expression that can refer to any asset in the process.

The condition is met when the expression evaluates to "Yes".

Custom Field

This condition gets the value of a custom field on an asset and compares it to the result of an expression. Only certain types of assets are supported.

You can choose the type of comparison that determines when the condition is met:

  • Field is equal to the expression
  • Field is not equal to the expression
  • Field is less than the expression
  • Field is less than or equal to the expression
  • Field is greater than the expression
  • Field is greater than or equal to the expression

Document

This condition queries the documents on a matter, contact or workgroup against certain criteria.

You must specify a document type that is the subject of the query. You can then test for the following:

  • Is present - The condition is met if any documents match the criteria.
  • Is absent - The condition is met if no documents match the criteria.
  • Appears once - The condition is met if only one document matches the criteria.
  • Appears multiple times - The condition is met is two or more documents match the criteria.
  • Is present and finalised - The condition is met if any finalised documents match the criteria.
  • Is present but not finalised - The condition is met if any documents which are not finalised (i.e. draft) match the criteria.

Depending on the source, you can also broaden the query to include:

  • Documents on client contacts
  • Documents on related matters
  • Documents on matters (where the contact is a client)
  • Precedents inherited from parent workgroups

Ledger Balance

This condition checks the balance on a ledger (or account) and compares it to the result of an expression.

You can choose the type of comparison that determines when the condition is met:

  • Balance is equal to the expression
  • Balance is not equal to the expression
  • Balance is less than the expression
  • Balance is less than or equal to the expression
  • Balance is greater than the expression
  • Balance is greater than or equal to the expression

You can also choose the type of balance (e.g. current, forecast).