Split A Text Column By A Delimiter

Input collection: myContactNames16

FullNameEmail
Johnson, Bruce[email protected]
Field, Sally[email protected]
Nyugen, Sam[email protected]
Waters, Laura[email protected]
Noble, Jackie[email protected]


Output collection: mySolution16

FirstNameLastNameEmail
JohnsonBruce[email protected]
FieldSally[email protected]
NyugenSam[email protected]
WatersLaura[email protected]
NobleJackie[email protected]


Solution code:

\\Create a collection
ClearCollect(myContactNames16,
{FullName: "Johnson, Bruce", Email: "[email protected]"},
{FullName: "Field, Sally", Email: "[email protected]"},
{FullName: "Nyugen, Sam", Email: "[email protected]"},
{FullName: "Waters, Laura", Email: "[email protected]"},
{FullName: "Noble, Jackie", Email: "[email protected]"}
);

\\Get split column by delimiter code
ClearCollect(
    mySolution16,
    DropColumns(
        AddColumns(
            myContactNames16,
            "FirstName",First(Split(FullName,",")).Result,
            "LastName",Last(Split(FullName,",")).Result
        ),
        "FullName"
    )
);