I get this error

This is my code and the last line doesn't work and causes the error above!
ClearCollect(
col_RecordsToPatch,
ForAll(
varSampleNumberSequence,
{
Proposal: DataCardValueProposal.Text,
Phase: varPhase,
'Service Line': {Value: varServiceLine},
'Sample ID': Upper(TextSampleIDPrefix.Text) & Text(
ThisRecord.Value,
"000"
),
'Sample Group Name': DataCardValueSampleGroupName.Text,
'Sample Description': DataCardValueSampleDescription.Text,
'RINew Refs': lbl_RinewRefs.Text,
'Sample Storage Location': {Value: DataCardValueStorageLocation.Selected.Value},
Customer: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: Value(lbl_CustomerID.Text),
Value: lbl_Customer.Text
},
'Received Date': DataCardValueReceivedDate.SelectedDate,
'Expected Disposal': DataCardValueExpectedDisposal.SelectedDate,
'Sample Owner': {
Claims: "i:0#.f|membership|" & varSelectedSampleOwnerEmail,
Department: "",
DisplayName: "",
Email: varSelectedSampleOwnerEmail,
JobTitle: "",
Picture: ""
},
'Received by': {
Claims: "i:0#.f|membership|" & varSelectedSampleReceivedByEmail,
Department: "",
DisplayName: "",
Email: varSelectedSampleReceivedByEmail,
JobTitle: "",
Picture: ""
},
'Proposal Author': {
Claims: "i:0#.f|membership|" & varProposalAuthor,
Department: "",
DisplayName: "",
Email: varProposalAuthor,
JobTitle: "",
Picture: ""
},
'Added to Sample Manager': DataCardValueServiceManager.Value
}
)
);
Patch('Sample Inventory',Defaults( 'Sample Inventory'),col_RecordsToPatch);
This was my code that worked but was too slow I'm trying to use the code above to speed up the patching but it doesn't work. Does anyone know how to fix this issue?
ForAll(
varSampleNumberSequence,
Patch(
'Sample Inventory',
Defaults('Sample Inventory'),
{
Proposal: DataCardValueProposal.Text,
Phase: varPhase,
'Service Line': {Value: varServiceLine},
'Sample ID': Upper(TextSampleIDPrefix.Text) & Text(
ThisRecord.Value,
"000"
),
'Sample Group Name': DataCardValueSampleGroupName.Text,
'Sample Description': DataCardValueSampleDescription.Text,
'RINew Refs': lbl_RinewRefs.Text,
'Sample Storage Location': {Value: DataCardValueStorageLocation.Selected.Value},
Customer: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: Value(lbl_CustomerID.Text),
Value: lbl_Customer.Text
},
'Received Date': DataCardValueReceivedDate.SelectedDate,
'Expected Disposal': DataCardValueExpectedDisposal.SelectedDate,
'Sample Owner': {
Claims: "i:0#.f|membership|" & varSelectedSampleOwnerEmail,
Department: "",
DisplayName: "",
Email: varSelectedSampleOwnerEmail,
JobTitle: "",
Picture: ""
},
'Received by': {
Claims: "i:0#.f|membership|" & varSelectedSampleReceivedByEmail,
Department: "",
DisplayName: "",
Email: varSelectedSampleReceivedByEmail,
JobTitle: "",
Picture: ""
},
'Proposal Author': {
Claims: "i:0#.f|membership|" & varProposalAuthor,
Department: "",
DisplayName: "",
Email: varProposalAuthor,
JobTitle: "",
Picture: ""
},
'Added to Sample Manager': DataCardValueServiceManager.Value
}
)
);