I am trying patch a collection with another collection but I am getting the error, "The data source supplied to the function is invalid"
//Created a duplication of data source with old codes
ClearCollect(colColourCodes,ColourCodes);
//Created an duplication of data source that is empty
ClearCollect(colCodeNo, Defaults(ColourCodes));
Clear(colCodeNo);
//Gets all the codes that are stored in a string and creates a list
ClearCollect(
colCodeNo,
ForAll(
ForAll(
Split(lblCodes.Text, ","), {Result: ThisRecord.Value}) As row,
With({
recAC: Find("'", row.Result)
},
{
Approval_Code: Mid(row.Result, recAC+1, 8),
Available: "y",
RequestID: Blank()
}
)
)
);
//Error occurs when bulk patching
Patch(colColourCodes, colCodeNo);
Not sure why the error is occurring given I created both collections with the same data source.
Any feedback is appreciated.
WarrenBelz
146,601
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,942
Most Valuable Professional