I just whipped up a test app real quick and got this to work. There might be a more optimized way to do this but it seems to work fine in my tests. Hope this helps!
//Split each row in the text box into its own collection for easier reference in the ForAll loop
ClearCollect(names, Split(TextInput1.Text, Char(10)));
ClearCollect(types, Split(TextInput2.Text, Char(10)));
ClearCollect(colors, Split(TextInput3.Text, Char(10)));
ClearCollect(food, []);
//Step through each index in the names column, adding the corresponding index values in the other collections to our new collection
ForAll(Sequence(CountRows(names)),
Collect(food, { name: Last(FirstN(names, Value)).Result, type: Last(FirstN(types, Value)).Result, color: Last(FirstN(colors, Value)).Result } ))
------------------------------
Manny Baylor
Director of Technology
Project Chesapeake
------------------------------
Original Message:
Sent: Feb 24, 2022 05:23 PM
From: Work Hard
Subject: Combine 3 Columns into one Collection
Hi everyone. I'm new here. Hope I can get some assistance.
Say I have a Sharepoint List with 3 Columns.
Each column is just a simple multiline textbox that has each value split using a new line. (assuming that all columns will always have the same amount of rows)
Column1:
Apple
Banana
Carrot
Column2:
Fruit
Fruit
Vegetable
Column3:
Green
Yellow
Orange
DesiredOutputCollection:
Apple;Fruit;Green
Banana;Fruit;Yellow
Carrot;Vegetable;Orange
I'm thinking something like this but can't think of the proper method.
ClearCollect( DesiredOutputCollection, DropColumns( AddColumns( 'My Sharepoint List', "3ColumnsCombined", Column1&", "&Column2&", "&Column3 ), "Column1";"Column2";"Column3" ));
------------------------------
Work Hard
------------------------------