How to split values in a field and return the values as 2 separate records

Illustrated below is an example of a flow where the Record Generator is used as a source step.

image

The image below consists of the data that is in the Record Generator step.

image

The output of the data in the Record Generator is in the image below.

image

Illustrated in the image below is the code that is used in the Calculator step. The field “FullName” is created and used to split the values in the Name field. It splits the values on the comma ( , ) and returns it in an array. The FirstName and LastName fields are created and used to reference the values in the FullName field based on the element index in the array.

image

Highlighted in the below image is the output results of the value in the Name field being separated and returned as FirstName and LastName. The FullName array shows the values and the element index they are assigned to.

image