Table of contents
Related articles
Introduction
Basis for the conditions
How it works
Configuration of a condition in a form
Configuration of a condition for a task
How to build conditions and the available operators
The comma
Quotation marks
Is equal to
Is different from
The field was filled or selected
Values contained in a specific field of a form
Value contained in a field from the request
The combination of fields
Error display
Related articles
Introduction
Information provided by the user within the request submit form is important and we have worked on conditions on forms and tasks to better exploit it. The conditions allow forms to be dynamic and to ask questions to the user based on his previous responses. In addition, with the conditions it is possible to adapt the workflow of the request by selecting which tasks will be generated.
Conditions apply on two types of actions:
-
Fields to display in a form.
-
The generation of a task in a service request.
Basis for the conditions
Conditions can be based on:
- The value of a field in the custom form.
- The value of a field in the request.
- Whether or not a field was filled.
How it works
To add conditions to a field in a form or a task, you need to use the F3 key to see available fields and to add the description of a condition.
Configuration of a condition in a form
In the dynamic form creation, the form fields and those from the request are the criteria that will be used as conditions to determine if the field is to be displayed or not to the user.
Follow these steps to add a Display condition:
- Go to Options section.
- Place the mouse in the Display condition field.
- Press F3 on the keyboard.
- Choose the field on which the condition will be based on.
- Add the displayed condition.
- Test the form to make sure everything works.
- Make corrections if needed.
- Finish with OK in the field and proceed with the configuration of the rest of the form.
Configuration of a condition for a task
When generating tasks, fields from request and form can be used as variables. These variables can then be put into the Condition field control task creation.
Follow these steps to add a condition for task creation:
- Place the mouse cursor in the Condition field.
- Press F3 on the keyboard to display the custom and request fields available.
- Make your selection and confirm with OK.
How to build conditions and the available operators
Whether the conditions are used in a form or a task, the method to configure the condition is the same. As it is easier to see and validate on the visualization screen, the following examples are shown in forms.
When you prepare task conditions, test the conditions as a field display condition first, since it is the easiest way to determine if the conditions work.
You can't use a variable after the operator. It is absolutely necessary to test it with a value, as shown in the following examples.
In bilingual environments, it is important to build the value list tied to combo list or radio buttons field types in both languages. The use of a comma is very useful in this mode.
Be careful when renaming a field or a choice in a value list, since it could well render a condition invalid. Use the display screen to properly validate conditions.
The comma
- To add more then one choice to a condition, they must be separated by a comma.
- Blue, White, Red
- In a bilingual mode, this is how to account for both languages.
- Yes, Oui
Quotation marks
- Quotation marks encloses the response for text, large text, or value list value containing a comma in it. As explained in the previous point, the comma is used to separate the different valid responses in a condition. They will be used in elements of a list like:
- iPhone 6, grey
- iPhone 6, silver
- LG G5, black
- Samsung Galaxy S7, black
- A condition based on these fields will need quotation marks to work properly:
- [[NameOfTheVariable]]="iPhone 6, grey", "iPhone 6, silver"
Is equal to
- Use the equal sign = in a condition based on a Combo list or Radio button type field.
- To indicate the choice or choices that will make the condition true.
- Use the equal = sign in a condition based on fields of the following types Check box, Date, Date and Time, File Attachment or CI.
- = True, indicates that the condition will be met if the field is checked or filled.
- = False, indicates that the condition will be met if the field stays empty.
Is different from
- Use smaller than and greater than signs as follows <> in a condition based on a Combo list or Radio button type field.
- To indicate the choice or choices that will make the condition true.
The field was filled or selected
Conditions can be based on the fact of adding information or using a field.
- Use the =True combination in a condition based on using one of the following types Check box, Date, Date and Time, Text, File Attachment or CI.
- =False will indicate the opposite, meaning that the field was left empty.
Values contained in a specific field of a form
- A condition can be based on the text entered into a text or large text field.
- The text searched needs to be in quotes.
- Octopus does not distinguish between upper and lower case letters.
- Wild cards variables are not supported.
Value contained in a field from the request
- A condition can be based on the fields of a request instead of the ones from the form, for example:
- The Site of the user.
- The Department of the user.
- The VIP field of the user.
Certain fields, like Site or Department, can be associated with diverse elements like the Requester, the User or the CI. It is hence very important to make the selection from the correct node .To build a condition with Site/subsites, they must be separated by comma, such as: [[Field1]] = "Site,Subsite1,Subsite2" .
The combination of fields
Conditions can be combined to define a condition on more than one field at a time. This works with fields from the form as well as fields from the request.
Use the following variables to combine more than one field to a condition:
- @OR
- For a OR type condition, Field[[1=]]ABC@ORField[[2]]=ABC, DEF.
- Everything can be on the same line or there can be a carriage return (Enter) to separate the first field of the variable.
- Only one of the conditions must be true for the condition to work.
- @AND
-
For a AND type condition, [[Field1]]= ABC @AND [[Field2]] = DEF.
-
Everything can be on the same line or there can be a carriage return (Enter) to separate the first field of the variable.
-
Every variable must be met for the condition to work.
-
- Parentheses
- Allows combining multiple operators in a single logical expression.
- Respects operator priority by resolving expressions contained within parentheses first.
- Parentheses must be in equilibrium on either side of an operator, e.g.: ( expr1 ) @And ( expr2 @Or expr3 ) presents the same amount of parentheses on either side of the @And operator.

For example, if the email or extension fields are empty.
The condition for an empty email field would be [[@Incident.User.Email]]=False
Error display
Over time, changes may be made to your catalog of custom fields (merging, deletion, etc.) which may leave invalid references in your query types.
Existing errors can be viewed by consulting the query types in the Reference data management menu. They will be reported as a warning by a triangle with an exclamation mark, or by a yellow circle where they occur. In the case of tasks, the number(s) of problematic tasks, i.e. where errors occur, will be indicated. See the 2nd image below.
Please note that it will still be possible to save your query type, but the presence of invalid fields or conditions will affect the desired behavior in the query types concerned.
Custom field variables can be used in the following places:
- Alternative subject
- Tasks
- Subject
- Description
- Condition
- Form fields
- Display condition
Here are some examples of errors:
Thank you, your message has been sent.