cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
faithdwn
Level: Powered On

Avoiding Duplicate Submission

I have an App for Repair Requests. I want to avoid receiving duplucate requests (Serial Numbers) for open requests (Status - "Request Submitted", "In Progress"). 

 

I have a form connected to the SP list that it submits to (PIVRequests) but it references the a few fields from another hidden form that is connected to a different list (PurpleScan). Picture below. This is set up this way because of the scan barcode function i use. 

 

How do i get the form to search the SP List Status coulmn for "Request Submitted" and "In Progress" for the Serial number being submitted? My submit button OnSelect Property is currently set to: SubmitForm(CreateTicketForm_1);ResetForm(CreateTicketForm_1);Set(RunFlow, true);Navigate(ConfirmSubmitScreen,None). 

I tried If(IsEmpty(LookUp(PIVRequests,Column_x0020_Number_x002f_Locati = DataCardValue36.Text)),SubmitForm(CreateTicketForm_1);ResetForm(CreateTicketForm_1);Set(RunFlow, true );Navigate(ConfirmSubmitScreen,None)) but it isn't doing what i want. 

 

Thanks for the help!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Avoiding Duplicate Submission

Hi @faithdwn ,

Could you please share a bit more about your scenario?

Do you want to avoid submitting duplicated record which has same Serial Numbers with  "Request Submitted" or "In Progress" status?

 

I have made a test on my side, please take a try with the following workaround:

If(
   IsBlank(LookUp(PIVRequests, 'Serial Number' = "A specific serial number value" && (Status.Value = "Request Submitted" || Status.Value="In Progress"))),
SubmitForm(CreateTicketForm_1);ResetForm(CreateTicketForm_1);Set(RunFlow, true );Navigate(ConfirmSubmitScreen,None),
Notify("The Repair Request with same Serial Number has been submitted, please do not submit repeatly!", NotificationType.Error) )

Or

If(
   IsEmpty(
Fiter(
PIVRequests,
'Serial Number' = "A specific serial number value",
Status.Value = "Request Submitted" || Status.Value="In Progress"
)
), SubmitForm(CreateTicketForm_1);ResetForm(CreateTicketForm_1);Set(RunFlow, true );Navigate(ConfirmSubmitScreen,None), Notify("The Repair Request with same Serial Number has been submitted, please do not submit repeatly!", NotificationType.Error) )

Note: The 'Serial Number' column is a column in your PIVRequests list, which used to store the Serial Number values. I assume that the Status column is a Choice type column in your PIVRequests list.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Highlighted
Super User
Super User

Re: Avoiding Duplicate Submission

Hi @faithdwn 

 

When you say that it isn't doing what you want, can you specify what it is doing and what you expect?

 

One thing I notice is that there is no 'else' clause in your If function - perhaps try adding a 'Notify' statement to tell the user that their details have not been submitted because of the duplication.

 

If(IsEmpty(LookUp(PIVRequests,Column_x0020_Number_x002f_Locati = DataCardValue36.Text))
,SubmitForm(CreateTicketForm_1);ResetForm(CreateTicketForm_1);Set(RunFlow, true );Navigate(ConfirmSubmitScreen,None),
Notify("That Serial Number Already Exists", Warning))

You might also want to see if you can mark the relevant field in SharePoint as unique (do not allow duplicates). If the rule is based on a combination of fields, that is something you can't do with SharePoint asaik, depending on the size and complexity of your system you might want to consider Azure SQL DB for the backend).

Community Support Team
Community Support Team

Re: Avoiding Duplicate Submission

Hi @faithdwn ,

Could you please share a bit more about your scenario?

Do you want to avoid submitting duplicated record which has same Serial Numbers with  "Request Submitted" or "In Progress" status?

 

I have made a test on my side, please take a try with the following workaround:

If(
   IsBlank(LookUp(PIVRequests, 'Serial Number' = "A specific serial number value" && (Status.Value = "Request Submitted" || Status.Value="In Progress"))),
SubmitForm(CreateTicketForm_1);ResetForm(CreateTicketForm_1);Set(RunFlow, true );Navigate(ConfirmSubmitScreen,None),
Notify("The Repair Request with same Serial Number has been submitted, please do not submit repeatly!", NotificationType.Error) )

Or

If(
   IsEmpty(
Fiter(
PIVRequests,
'Serial Number' = "A specific serial number value",
Status.Value = "Request Submitted" || Status.Value="In Progress"
)
), SubmitForm(CreateTicketForm_1);ResetForm(CreateTicketForm_1);Set(RunFlow, true );Navigate(ConfirmSubmitScreen,None), Notify("The Repair Request with same Serial Number has been submitted, please do not submit repeatly!", NotificationType.Error) )

Note: The 'Serial Number' column is a column in your PIVRequests list, which used to store the Serial Number values. I assume that the Status column is a Choice type column in your PIVRequests list.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
faithdwn
Level: Powered On

Re: Avoiding Duplicate Submission

Thank you for the help, the formula worked just fine. 

Community Support Team
Community Support Team

Re: Avoiding Duplicate Submission

Hi @faithdwn ,

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 108 members 4,801 guests
Please welcome our newest community members: