Patch(
'List-Evidence_Tracker',
Defaults('List-Evidence_Tracker'),
{
CriteriaID: LookUp(
'List-Criteria',
Criteria = DataCardValueEvCriteria.Selected.Value,
ID
),
EvidenceTypeID: LookUp(
'List-EvidenceType',
Title = DataCardValueEvType.Selected.Value,
ID
),
'Evidence-Title': DataCardValueEvTitle.Text,
'Link to Evidence': DataCardValueEvLink.Text,
ResponsibleID: LookUp(
'List-Responsible',
Title = DataCardValueEvResponsible.Selected.Value,
ID
),
Trade: {
'@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy",
TermGuid: DataCardValueEvTrade.Selected.TermGuid,
WssId: DataCardValueEvTrade.Selected.WssId,
Label: DataCardValueEvTrade.Selected.Label,
Path: DataCardValueEvTrade.Selected.Path,
Value: DataCardValueEvTrade.Selected.Value
},
Subcontractor: DataCardValueEvSubcon.Text,
'Planned Collection Date': DataCardValueEvPlannedDate.SelectedDate,
'Actual Collection Date': DataCardValueEvActualDate.SelectedDate,
'Submitted to ESDC?': DataCardValueEvSubmitESDC.Value,
'Collection Status Comments': DataCardValueEvComments.Text
}
);
If(
// check if there were any errors when the item was submitted
!IsEmpty(Errors('List-Evidence_Tracker')),
// if true, show any error message
Notify(
"Criteria submission failed",
NotificationType.Error
),
// else, go to success screen
ResetForm(frmAddEvidence);
Navigate(scrnMainScreen);
);