Reference:
https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-check-duplicate-item-in-list-using-powerapps/td-p/464222
If(
!IsBlank(LookUp('Registration list', Event = EventDropdown.Selected.Value && EmpEmail = EmpEmailTextBox.Text)),
Notify("The user " & EmpEmailTextBox.Text & " has submitted same event for " & EventDropdown.Selected.Value & " already. Do not submit repeatly!", NotificationType.Error),
SubmitForm(EditForm1);ResetForm(EditForm1)
)
[code] UpdateContext({showGrpDeleteEditConfirmation: false});
UpdateContext({foundConnected: false});
UpdateContext(
{
foundConnected: If(
CountRows(
Filter(
DS, colName = aValue
)
) = 0,
false,
true
)
}
);
If(
foundConnected,
Notify(
"Record already in use, cannot be deleted.",
NotificationType.Error,
2000
),
Remove(
DS,
record
);
Navigate(
scr,
ScreenTransition.Fade
)
);
[/code]