Introduction
In AccuCampus, Rules are created to execute based on predetermined events, such as:
- When a user swipes a card, and the card ID has something specific about it.
- When a log is created.
- When an appointment is canceled.
After a Rule is triggered, AccuCampus can automatically perform an action, like:
- Send a message.
- Create a Tag.
- Stop an action.
In this case, this article will explain how to use the "Stop Execution" action. This tool forces AccuCampus to stop executing whatever task a user might be undertaking if something isn't right. This could be a missing piece of information or incorrect information.
This example will create a Stop Execution action that will specifically check to make sure all session logs have their location
information. As a trigger (what sets the action off), it's going to use "When a session log is
saved," and as a condition (a specific situation for the trigger to go off), it's going to specify "If the Location ID is
empty." If this happens, it will then trigger a Stop Execution action
and send a message to the user explaining that they need to fill in this missing information before trying to save again.
TIP: The "Stop Execution" action can be used for several different purposes beyond what's described in this article.
Step-By-Step
Creating the Rule
1. Navigate to Advanced Options > Settings.
2. Select the "Rules" module.
3. Click the Create New button or select an existing Rule to edit.
4. Name the Rule and writing a description of what it does.
TIP: Be
as specific with the description and the name as possible. This way,
other administrators will know exactly what this rule does.
5. Choose "When an attendance log is saved" from the Trigger drop-down menu.
6. For the Trigger, select "Internal ID," "is," and write "?" in the final text box.
7. Click Add Action, select "Stop execution" from the list, then write a message that will be sent to the user and click Save.
8. Click Save at the bottom of the page.
Test the Rule
Create a session log with a location (the Rule shouldn't block its creation) and one without a location (the Rule should block its creation). If the Rule doesn't appear to be working correctly, go back to the beginning of this article and double-check that all the steps were followed correctly.