I have this code to show error when if any and navigate if it patched successfully. however, it only shows an error message when there is an error. how can I show notify on success and navigate to other screens?
IF(
CountRows(
Filter(
'LOC SEW activity report',
'Type of Activity' = Dropdown3_1.Selected.Activities,
'Employee Name' = ComboBox2.Selected.Value,
Date = Dateselection.Selected.Value
)
) = 0,
Patch(
'LOC SEW activity report',
Defaults('LOC SEW activity report'),
{Wage: DataCardValue3_1.Text * Text(Piecerate_1.Selected.'Piece Rate')},
{'E. ID': Dropdown2_3.Selected.'Employee ID'},
{'Employee Name': ComboBox2.Selected.Value},
{'Type of Activity': Dropdown3_1.Selected.Activities},
{Date: Dateselection.Selected.Value}
),
Notify(
"This payment already processed",
NotificationType.Error,5000
);
//Navigate('success screen'); Set(startTimer, true)
Notify("Payment done", NotificationType.Success,5000)
);