Start a conversation

Using Automation Engine to show or hide a step based on a randomization value

In this tutorial you will learn how to hide or show a step based on the randomization of a record using the Automation Engine. Before creating an automation which will trigger the action of hiding a step, make sure the Automation Engine is enabled and all the Randomization settings are correct.

Parameters

Event: The subject is randomized to group 1 (treatment).

Action: Hide a step.

1. In your study, create a randomization field with the variable name 'rand_outcome':


2. Create a calculation field that has variable name 'rand_calc' and uses the template {rand_outcome}:

The outcome of this calculation will be a number. In my study, there are two groups and the outcome of the randomization will be either 1 or 2 (this generally works on the order in which you entered the randomization groups in the settings). This value will be used as a condition for the automations. Here is an example of the randomization settings:

3. Turn Automation Engine on within your Study under Study Settings by enabling beta features (if this is not tutrned on, you will get a warning later on in the Automation Engine). Once they are enabled, you will see tab 'Automations'  appear in the Study Settings. Go to the Automations tab and click on 'Add Automation'.

4. A new window will open where you can create your automation. Name your automation.

5. To set up an automation, press 'Add event' button' and choose 'Study Field Value Updated' as a trigger event, select the calculation field which contains the template to extract randomization outcome:


6. To be able to hide step based on the group the subject is randomized to, click on 'Add condition'. In the pop-up window, select 'Study Field Value' and click 'Next':

The automation will only run if the selected condition is true when the event occurs.

7.  After clicking the 'Next' button, you will need to click 'Select Variable' and choose the same calculation field that extracts the randomization outcome. You will then need to define a condition that will trigger the automation engine. In the example below, the automation will be triggered when the subject is randomized to the 2 group. In this case, the calculation field will have a result '2'. In this case, the condition will be as follows:

Click 'Save' to save  the condition.

8.  The next step is to select action to be triggered by clicking '+ACTION'. Choose 'Show/hide step' and select a step that needs to be hidden for the subjects randomized to group 2. In the present study, the step 'Assessment' will be hidden:

After the step is selected, click 'Select' and then 'Save'.

9. The Automation Engine is set up now, click the green button 'Save' to save the automation engine settings:

10. After the record is randomized, it is necessary to open the step that contains the calculation field. The randomization group will be visible in this calculation field and trigger the automation.

Here the subject is randomized to the group 1 and the automation is not triggered, the step 'Measurement' is visible:

In the record below, the subject is randomized to group 2 and the step is hidden:




Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Castor Support Team

  2. Posted
  3. Updated