We can use the “mid” function to separate the names.


Step 1. Create a text field for the first name

Add the following logic:

@CALCTEXT(mid([pi_name], 1, find(' ', [pi_name])-1))

Step 2. Create a text field for the last name

Add the following logic:

@CALCTEXT(mid([pi_name], find(' ', [pi_name])+1, length([pi_name])-find(' ', [pi_name])+1))

The final result will look like this:


More information on using 'mid' and other Conditional Logic can be found on the Help & FAQ page in REDCap


For additional assistance, please contact the REDCap Support Team


  • No labels