How to Split Comma-Separated Values in a Field into Individual Fields?

How to split comma-separated values stored in a single field (e.g., value1, value2, value3 ) and assign each value to a dedicated field (e.g., Field1, Field2, Field3)?

Example: Split Email field values into Email and Email2 fields.

Final Implementation Result

How to setup?

Step 1. Automation setup

Step 2. Run script setup

input_data = "<%= _triggers.trgX5bxu3kfYD1GR3fLpHPNB.record.cells.fldzu0lFBFe9asRYisxbcwmx.value %>"

email_list = [x.strip() for x in input_data.split(',')] if isinstance(input_data, str) else []
if email_list:
    first_email = email_list[0]
    other_emails = ', '.join(email_list[1:])
else:
    first_email = ''
    other_emails = ''

Step 3. Update records

1 Like