Date Variable

A date variable allows you to create, update, calculate and assign participant-specific dates to a their record. This can be useful for driving activities in the platform off of a specific date* such as an appointment date, or a smoking quit date. It can also be piped into messaging to a participant to let them know the specific date as well.

Setting up a date variable

Setting and updating date variables using event logic

Adding date variables to messaging

*For more information on how to schedule activities off of a date variable, check out the Event Blocks guide.


Setting up a date variable

  1. Navigate to Manage Study > Variables

  2. Click the “+ New Variable” button.

     

  3. Give the variable a friendly name and a description.

  4. If the variable should only be used in a specific arm, you can specify that arm. Otherwise, select “All arms” from the list.

  5. Select “Date” as the type from the list.

  6. The date can have an initial value that can calculate days from participant start. If you don’t want to have a default value, you can leave this blank.

  7. Choose the format in which you would like the variable to display in messaging.

  8. Click “Save Variable” button.


 Setting and updating date variables using event logic

  1. Navigate to Manage Study > Arms.

  2. Choose the intervention arm and click “Manage Event Schedule”.

     

  3. Depending on your study design, you will either build logic off of an existing event, such as an “Administer Survey” event, or you may schedule a new “Add Logic” event. In this example, we want to participant’s Quit Date variable to be updated based on the completion of a survey. Therefore we will build logic off of the “Set Your Quit Date” survey.

  4. Click “Define Logic” from the survey event.

     

  5. Define the criteria in the IF statement. In this example, the “Set Your Quit Date” survey is a single question survey. If the participant completes it, we want to modify the Quit Date variable.

     

  6. Choose “Modify the participant’s date variable” action in the THEN statement.

  7. Select the variable you want to set or change.

  8. You can choose to set the date variable to be today’s date, another date variable, or any responses from the survey that are validated dates. In this case, we want to set the Quit Date variable to the CustomQuitDate response in the survey.

     

  9. You can also add or subtract days from the today’s date, another date variable, or the survey response. If you do not need to offset the date (e.g. CustomQuitDate minus 7 days), then you can leave that dropdown blank and save.

     

  10. In this case, we do not need the offset, so we’ll leave it blank. Remember to click “Save Logic” to save your changes.

     


Adding date variables in messaging

Follow Steps 1-5 in Setting and updating date variables using event logic above.

  1. From the event logic screen, choose “Send a message” action in the THEN statement. Define the recipient and delivery method as well.

  2. Type your message content.

     

  3. Available variables will be listed below the content editor. You can copy and paste directly from there.

     

  4. Be sure to click “Save Logic”.

If you did not set up the date variable with a default value in the variable configuration, be sure you’ve used the “Modify participant’s date variable” logic action prior to using it in messaging. Otherwise, no date will be available to display.

Related articles