Overview
This article will explain how to establish logic and define relationships or dependencies between the state of child items and their parent item.
In other words, how to make a parent item depend on its child items. You can set things up so that the parent can only move forward when all its children are ready.
Use Case
To better understand this feature, let’s say we want to determine when a CAPA process is ready for release and approval.
The readiness of the CAPA process for release and approval is determined by the completion status of all subordinated children processes.
Using calculated fields can help establish conditions that reflect the overall maturity of the CAPA process based on the status of its child items.
Conditions can be created to link the approval of a parent process to the readiness of its child processes, ensuring that all necessary actions are completed before moving forward.
By using calculated fields to assess the completion percentage and establish mandatory rules based on the readiness state of the process, we can apply this logic between the parent and the child items. Implementing conditions for readiness ensures quality and compliance before release.
In our use case, CAPA is the parent item and CA (Corrective Action) and PA (Protective Action) are its child items.
Adding a ‘Completion (%)’ calculated field to the child Items
Create a calculated field named Completion (%) with the following calculation syntax: (IF(‘[*Me.Status*]’=’DONE’,1,0)*100)
- Create the field as a numeric box via Admin > Fields Managment
- Add this field to the CA and PA items via Admin > Fields Layout
- Edit the field and add the calculation syntax mentioned in green above by following these steps:
The syntax in the screenshots below is an example. For this use case, the required syntax is (IF(‘[*Me.Status*]’=’DONE’,1,0)*100)
Now, when we set the status of CA or PA items to ‘Done’, the Completion (%) will update to 100!
Adding a ‘Completion (%)’ calculated field to the parent Item
We can use the same Completion (%) field we created for the child items, this time however, we will:
1. Add it to the CAPA (parent) item in fields layout.
2. Enable calculation, but this time we will insert the following calculation syntax:
ROUND(AVERAGE([*Children.Completion (%)*]),1)
It will present the average completion rate of the CAPA child items (CA and PA).
Adding a ‘Process Readiness State’ calculated field to the parent Item
Create a calculated field named Process Readiness State with the following calculation syntax: IF(ROUND(AVERAGE([*Children.Completion (%)*]),1)=100,’READY’,”)
- Create the field as a Single Line Text Box via Admin > Fields Managment
- Add this field to the CA and PA items via Admin > Fields Layout
- Enable calculation, but this time we will insert the following calculation syntax:
IF(ROUND(AVERAGE([*Children.Completion (%)*]),1)=100,’READY’,”)
It will show the value of the CAPA as ‘Ready’ if all child items are marked as ‘Done’
Adding a mandatory field rule to the parent Item
Let’s say we want to ensure that the CAPA (parent item) status won’t change to ‘Effective’ if the Process Readiness State is empty (meaning it’s not marked as ‘Ready’ because some child items are not marked as ‘Done’).
To apply this logic, we will create a mandatory field rule with the following settings:
For example, if just 1 out of the 3 child items is not marked as ‘Done’, and we try to change the CAPA (parent) status to ‘Effective’, the system will show the custom error message we set up.