Check for WUSTL email in branching logic - survey invitation logic - or other advanced logic

The “right” function can be used to check for an @wustl.edu email address, check for not an @wustl.edu address, or check for any other email domain you would like.

For more information about the “right” function, see REDCap Functions to use with Text values on the REDCap Special Function Explanations page.

To check for an @wustl.edu email using Branching Logic:

  1. Click the Branching Logic icon on the field you would like to appear if the email is an @wustl.edu email.

  2. Click in the Advanced Branching Logic Syntax box and enter an equation with the “right” function so that REDCap checks if the final 10 characters of the email address entered to the field are equal to @wustl.edu and click Save. For example, if the variable name of the email field is [email], the formula will be: right([email],10) = '@wustl.edu'

image-20240723-182314.png
  1. Create a record and enter an @wustl.edu email address into the field to confirm the field with the Branching Logic appears (note: you may need to remove your cursor from the field after typing the address for the hidden field to appear):

image-20240723-182628.png
  1. Then enter a non @wustl.edu address to confirm that the field hidden by Branching Logic does not appear:

 

To check for a non @wustl.edu email using Branching Logic:

  1. Click the Branching Logic icon on the field you would like to appear if the email is not an @wustl.edu email.

  2. Click in the Advanced Branching Logic Syntax box and enter an equation with the “right” function so that REDCap checks if the final 10 characters of the email address entered to the field are equal to @wustl.edu and click Save. For example, if the variable name of the email field is [email], the formula will be: [email] <> '' AND right([email],10) <> '@wustl.edu'

The [email] <> '' portion of the formula is stating that the field will only appear if the email address field is not blank. Technically, when the email field is blank, the field does not have an @wustl.edu email in it and the Non-WUSTL email message field will appear if the field is blank. By adding the additional portion of the formula, we ensure the message does not appear until there is an email address in the field that is not an @wustl.edu address.

  1. Create a record and enter a non @wustl.edu email address into the field to confirm the field with the Branching Logic appears (note: you may need to remove your cursor from the field after typing the address for the hidden field to appear):

  1. Then enter a @wustl.edu address to confirm that the Non-WUSTL email field hidden by Branching Logic does not appear: