In this article, we show how to use validation rules on your checklists, ensuring that, for example, a picture is taken if something is "Not ok" or that a task is created if an error is discovered during an inspection that needs to be corrected.
In this article, you will find:
- General information about validation rules
- Where can you find validation rules?
- Create a validation rule
- Apply validation rule to a question
General information about validation rules
Multiple validation rules can be created for the same response type, so you can have different requirements for "Yes" and "No" depending on the question being asked.
Validation rules can be associated with each question in a checklist independently of one another, but it is only possible to set one validation rule per question (except for the response type "List").
When creating a validation rule, you choose what should happen or be required depending on the answer to the question - for example, that a photo is required if the answer is "Yes" and the creation of a task is enforced if the answer is "No".
Validation rules can be created for the following response types:
- Integer
- Decimal number
- Yes / No
- Okay / Not ok
- Date
- List
The following rules/requirements can be adjusted in connection with a validation rule:
- Add status code (color code)
- Require comment
- Require picture
- Require marking on a drawing to a specific question
- Add event:
- Show warning text ➜ a pop-up window will appear in the app with the warning text, e.g., "Contact your site manager" or "Be aware of [...]"
- Enforce task creation in the app ➜ a button "Add task" will appear under the question in the app, through which a task can be created manually (without leaving the checklist response)
- Automatically create task ➜ a task will be automatically created without the app user being notified (read more here: Example: Validation rule with a task)
Where can you find validation rules?
Note! Validation rules are managed independently for QA checklists, Inspection checklists, and HSE checklists. This way, you only see and can use the validation rules created under Digital QA when making QA checklists, while your Inspection validation rules are in that module, etc.
They are essentially found in the same way. Below, we show you where to find validation rules for QA checklists, but the procedure is the same whether you are in the QA, Inspection, or HSE module.
Global ➜ Digital QA ➜ Checklists➜ Create checklist or edit an existing checklist.
Open question settings by clicking the arrow next to a question:
Note! If this is done via a new checklist, the response type must first be set to, for example, Yes/No for the shortcut to the validation rules to appear.
Create a validation rule
After following the above instructions, you will see this pop-up window, where you can click on "Create new validation rule"
Next, choose a name and the response option you want to create a validation rule for, as well as what should happen depending on the selected answer. Remember to click "Save changes" at the bottom right.
Example: Validation rule with a task
In this example, we create a validation rule for the response type "Ok/Not ok," where we want a picture to be taken if the answer is "Ok." If the answer is "Not ok," a comment must be written, a picture must be taken, and a task must be created—since there is something that needs to be corrected, as it is "Not ok".
NOTE! Name of validation rule:
It is entirely optional how you choose to name the rule, but we recommend naming it something that makes it easy to remember what the validation rule does when you need to apply it to questions in different checklists.
NOTE! Creation of tasks:
To use this event in a validation rule, you must first create the relevant task type – read more here: Create and edit task types
There are two ways to ensure the creation of a task in relation to a specific answer:
- Require creation of task in app.
- Create task automatically
If you choose "Require creation of task in the App", you simply need to select the type of task to be created. Subsequently, it will function in the app so that a button appears under the question when the answer that enforces task creation is selected.
When you click on "Add task", you manually create a task where you can write a description of the task, add pictures, add location/drawing markings, and select an asignee, deadline, etc.
If, on the other hand, you choose "Create task automatically", you need to decide which task type should be created, what the deadline should be, and which profession group should be responsible—since these options are not available to the user in the app, as the task is created without the app user seeing it.
For these tasks, images, comments, and drawing marking will be displayed if they have been made directly on the question in the checklist that forms the basis of the task creation. If no images, comments, or drawing markings have been added in the question response, the automatically created task will therefore be blank.
Apply validation rule to a question
Once you have created your validation rule, it's time to apply it to the relevant questions.
There should be a question created and a response type selected ➜ Then click on the arrow to open question settings ➜ Click on the drop-down menu under "Add validation rule" and select ➜ Click on "Save checklist"
Note! It will only be possible to choose from the validation rules that have been created for the specific response type you have set for the question.
You don't need to use validation rules on all the questions in the checklist, and it's also possible to use multiple different validation rules within the same checklist—there can just be only one rule per question
If you need to use validation rules on a question with the answer type "List," it is slightly different, which we will cover in the next section below.
Example: Validation rule on answer type: List
In this example, we create a validation rule for the answer type "List," where pictures need to be taken depending on which answer from the list is selected, and nothing else. The validation rule itself is very simple to create, but attention must be paid to how it is subsequently applied to a question/answer.
Afterwards, we can use the validation rule on a question/answer, which works a bit differently for the response type "List." We will now go through this process.
When you have a question with the response type "List," it is not possible to select a validation rule directly in the question settings. This is because the rule must be applied to the individual answer type instead, allowing you to use different validation rules for different answer types.
Click the pencil to the right of the answer type:
Choose a validation rule ➜ Click "Save changes"
Note! Remember to click "Save checklist".
Contact us
If you have any questions, you are always more than welcome to contact our support at support@inspectly.com
Comments
0 comments
Please sign in to leave a comment.