Hi @Hemasai1999,
You'll have to adjust for your columns, but you can either collect it like this;
Collect(ArchiveList,
ShowColumns(
Filter(OriginalList, EndDate < Today()), "Column1", "Column2", "Column3")
);
RemoveIf(OriginalList,EndDate < Today())
or you can patch it like this;
With({baseTable: ShowColumns(Filter(OriginalList, EndDate < Today()), "Column1", "Column2", "Column3")},
Patch(ArchiveList, baseTable,
ForAll(baseTable, {
Column1: Column1,
Column2: Column2,
Column3: Column3
})
)
)
RemoveIf(OriginalList,EndDate < Today())
Because you're copying data from one list to another, (as opposed to editing data or creating data in the same list), you have to work with just the columns containing the data you want to copy. You have to drop all the other SharePoint columns that tend to come along with it - hence the use of ShowColumns().
The patch function is constructed as a batch - there are other ways to do it, but if you have lots of data it would hopefully be more efficient in a batch.
Hope this helps,
RT