Hi
I'm trying to display a custom error message if a Patch() fails. It's not displaying my text but just the standard message. Please see my code below. I have turned on formula error processing in setting for the app. Any clues?
Thanks for any insights 😊
If(
nErrorCount < 1,
Patch(
'DocuLibrary',
LookUp(
'DocuLibrary',
ID = glbSelectedDocID
),
{
'Sign Off Status': "In Progress",
ExpectedApprovalCount: nApproverCnt,
ApprovalRequester: CompUser.Email,
'Approved by Date': DateValue(dteApprovedByDatePicker.SelectedDate)
}
);
//if it fails display error, try again
If(
!IsEmpty(Errors('DocuLibrary')),
Set(Msg0, $"{First(Errors('DocuLibrary')).Message}");
Notify(
Concat(
Errors('DocuLibrary'),
Msg0 & " - Failed to update document for workflow, please try again."
),
NotificationType.Error
);
, //else, update approval history list
….stuff here…..
); //end of update code

Report
All responses (
Answers (