MERGE Two Columns Into A Single Column


Input collection: myContactNames17

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


Output collection: mySolution17

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


Solution code:

//Create a collection
ClearCollect(myContactNames17,
{FirstName: "Bruce", LastName:"Johnson", Email: "[email protected]"},
{FirstName: "Sally", LastName: "Field", Email: "[email protected]"},
{FirstName: "Sam", LastName: "Nyugen", Email: "[email protected]"},
{FirstName: "Laura", LastName: "Waters", Email: "[email protected]"},
{FirstName: "Jackie", LastName: "Noble", Email: "[email protected]"}
);

//Merge two columns code
ClearCollect(
    mySolution17,
    DropColumns(
        AddColumns(
            myContactNames17,
            "FullName",
            LastName&", "&FirstName
        ),
        "FirstName","LastName"
    )
);