web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / 2 problems please Help
Power Apps
Unanswered

2 problems please Help

(0) ShareShare
ReportReport
Posted on by 8

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. 

 

HGBH_0-1660232959983.pngHGBH_1-1660232987851.png

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".

HGBH_2-1660233249912.png

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @HGBH 

    Please see https://easypowerplatform.com/2020/03/07/handling-errors-in-powerapps/  for a better way of handling errors.  First, by disabling the Submit button if errors are found and second, by customizing the error property of the card to prevent the user from entering bad data. 

  • HGBH Profile Picture
    8 on at

    @Drrickryp 

    I tried this on my code and it disable the submit button which is great, but it does not help me with the issue I am having. 

    I been trying to figure out what is wrong with my code but i can not figure out why. I do not get any error message on it. just the button gets disable.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @HGBH 

    Your code is way too complex.  I suggest that you customize the error messages in the cards for entering the Workbench Policy Number and the Workbench Risk ID as described in the article.  The screenshot shows an example of the formulas and where to use them.  Each card contains an errormessage label that can be customized.

    1.jpg

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

     see above

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard