I've got a string from a gallery field (galMyData.Selected.People) in the format-
lastName1, firstName1 ([email protected]) - Dept1 Dept2 Dept3 ; lastName2, firstName2 ([email protected]) - Dept1 Dept3 ; lastName3, firstName3 ([email protected]) - Dept1 Dept4
I can split the string and create a table using-
ClearCollect(
SelectedPeople,
Split(galMyData.Selected.People, " ; ")
)
This yields a collection with all of this in a single column
lastName1, firstName1 ([email protected]) - Dept1 Dept2 Dept3
lastName2, firstName2 ([email protected]) - Dept1 Dept3
lastName3, firstName3 ([email protected]) - Dept2 Dept4
I'd like to create a new collection separating this out into distinct columns. i.e.
(header)LastName FirstName FullName Email Dept1 Dept2 Dept3 Dept4
lastName firstName "lastName, firstName" [email protected] true true true false
(I don't need the header but I'm including it for illustration) I'm really not sure how to separate out the fields to create a new collection.
Any guidance would be greatly appreciated.
For anyone tracking this, I achieved it using this-