Automated updates to a field based on the linked entity
There may be situations where you need to update a field in one record based on changes in another record. For example,
a participant's “status” field may have to be updated when the activity they are participating in is marked as
completed. However, updating them manually, one by one, can be time-consuming and cumbersome. There is also the risk of
forgetting to update some records, leading to inconsistent and inaccurate data.
Aam Digital offers a feature that can automatically update values based on linked entities. When you update a record's
status, the statuses of related records are also automatically updated. This ensures that your data remains accurate and
consistent with real-life situations. By automating these updates, you save time and can focus on other important tasks.
Example Scenario
To better explain this feature, let's take an example of a coaching class being run:
Let’s assume multiple students and teachers are part of a coaching class. You want to track each student's status based
on the status of the class (whether it is only planned, ongoing, or already finished).
Updating the status of each student individually can be time-consuming and cumbersome. However, with this feature, you
can automate the status update for all students in the class simultaneously. While updating the status for the entire
class, you will also have the option to manually change the status of specific students if needed.
Screenshot of updating the status of a Recurring activity and the status of the students linked to that activity.
Through this guide, we will show you how to configure fields so that updating the status of the class will automatically
update the related status for the students linked to it.
The entity types in this example are
- Students / Participants (“Child” records in the demo system)
- Coaching Class (a “Recurring Activity” in the demo system)
Using the automated field updates
The demo system (demo.aam-digital.com) already has an example pre-configured:
1. Navigate to Attendance > Recurring Activities
2. Open one Activity
3. Edit the field “Status of Activity”, and click on the Save button.
4. --> A dialogue box will appear with a list of students with the automated status update:
You can manually change the participants' statuses from this screen.
After you have edited the status of the participants and confirmed to "Update related records", the status of each of
the linked children will be updated.
Configuring automated fields
Step 1: Checking the trigger
1. Navigate to Attendance> Recurring Activities
2. Click on Manage Activities, and a list of classes will appear; select a class.
3. In the “Participants tab” of the class, there is a list of students linked to this coaching class.
For the sake of this guide, the field “Status Activity” in the “Basic Information” tab will be set as the trigger field
for automating the updates.
The field has the following dropdown options:
- Planned
- Ongoing
- Completed
Note that currently, only a “dropdown” type field can trigger automations for other fields.
We are now creating an automation rule, which entails creating a link between the children's status and the status of
the class.
Step 2: Editing the field to be automatically updated
1. Navigate to the Children entity.
2. Open the Admin UI (“Edit data structure”), and click on the field “Status”.
(This field can be set as a text, dropdown field, or any other data type.)
This is the field to be updated automatically when the “trigger” field (step 1) changes.
Step 3: Setting up the automation rule
In the dialog to edit the field, click on the tab "Advanced Options & Validation":
In the "Advanced Options & Validation" tab you can active the functionality through the "Default Value" setting. Click
on the last icon there for "Auto Update":
This option is only available if this entity type is linked to from another type (here: from the “Recurring Activity”
entities)
Step 4: On clicking the Auto update icon, you can select which other entity should trigger updates to this field:
We are creating an automation rule between the child entity and the recurring activity (coaching class). The system will
then suggest to automatically update this field whenever the status of the coaching class changes in recurring activity.
Step 5: After selecting the entity (Recurring Activity, in our scenario), click “Configure Automation” to define the
further details.
1. Select the “related reference field” (in our scenario, the participants/children part of the coaching class)
2. Choose the field that will help trigger automated updates (in our scenario, Status of Activity)
Step 6: Define mapping of trigger and target values
You can now configure the exact automation rule. The change in the trigger field (Status of Activity) will update the
status of the Children linked to the coaching class.
Automation configuration for our example:
- Trigger Field (Status of Activity) --> Updated status (Status)
- Planned --> Requested
- Ongoing --> In Class
- Completed --> Finished
For example, if the Coaching class status is updated to Completed, the system automatically updates the children's
status to Finished.
Step 7: Test the configuration
Go back to the first section of this guide and try your automation action. Does it update Children's status when you
change a related Recurring Activity, as expected?