I think I have a clearer picture. If I'm not wrong, you want to add a new column to the item you're creating from gallery1 to gallery2. Something like this?
Collect(
collection, //Add new item to gallery2
AddColumns(
ThisItem, //Get item columns and values
'newColumn', //Add new column to record's structure
'default text' //Default value to let user fill in, could be blank too
)
)
By the way the code above doesn't work, we'll have to try something else.
The code below should to the trick:
Collect(
collection, //Add new item to gallery2
{
Title: ThisItem.Title, //Column from gallery1
Value: ThisItem.Value, //Column from gallery1
..., //Other columns from gallery1
NewColumn: 'value' //New column for gallery2
}
)
It may be a bit tedious if you want to use a lot of columns though. If you want to retrieve ALL columns at once, then try the following code:
With(
{
_item:Table(ThisItem) //Create a table with a single record to use the item's structure
};
Collect(
collection; //Add item to gallery2
First(
AddColumns(
_item; //Based on the structure from the list
"NewColumn"; //we create a new column
"Value" //with the value we need
)
)
)
)
Because "AddColumns()" requires a table as input and doesn't accept records, we can cheat a little by feeding it a table with a single record. "First()" retrieve this single record and then add the new column to the item created in the collection.