I am working on PowerApps and i want to submit a policy. my task was to check 2 fields before submitting. Workbench Policy Number and Workbench Risk ID and see if there is a duplicate that is being used in the SharePoint.
On the Submit button "OnSelect" i put:
Set(
showDialogue,
false
);
//Casualty Excess View
Switch(gloEditScreenFilter, "Casualty Excess View",
If(!IsBlank(LookUp(Filter('PROD - Casualty Risk Tracker DV', 'Workbench Policy Number' = DataCardValue160.Text), Text(ID) <> DataCardValue286.Text)),
Notify(
"Error - A policy with that Workbench Policy Number already Exists",
NotificationType.Error));
If(!IsBlank(LookUp(Filter('PROD - Casualty Risk Tracker DV', 'Workbench Risk ID' = DataCardValue267.Text), Text(ID) <> DataCardValue286.Text
)),
Set(showDialogue, true),
SubmitForm(EditForm1)),
//UT View
"UT View",
If(!IsBlank(LookUp(Filter('PROD - Casualty Risk Tracker DV', 'Workbench Policy Number' = DataCardValue272.Text), Text(ID) <> DataCardValue287.Text)),
Notify(
"Error - A policy with that Workbench Policy Number already Exists",
NotificationType.Error));
If(!IsBlank(LookUp(Filter('PROD - Casualty Risk Tracker DV', 'Workbench Risk ID' = DataCardValue271.Text), Text(ID) <> DataCardValue287.Text)),
Set(showDialogue, true));
SubmitForm(UTform),
//Primary Casualty View
"Primary Casualty View", SubmitForm(PCform));
Set(
gloDuplicateInvoiceBool,
false
);
Set(
agencyBoolean,
false
);
the logic for WB Policy Number and WB Risk ID works. however it does not want to save.


So above i put values that are saved on another policy 9140119 for WB Policy Number and i got the error message. and for WB Risk ID i got the pop up that will ask them if they still want to save or not.
the only problem i have is that when i change the values to unique values that are not in the sharepoint. it should save. but it does not.
the Second problem is that i do not really get an error but i get a yellow exclamation that says:
"Delegation warning. The "LookUp" part of this formula might not work correctly on large data sets".
