Solved

Preventing Duplicate Items being created on a separate SharePoint List

  • 8 November 2021
  • 3 replies
  • 313 views

Badge +2

I have a workflow that takes data from a repeating table on List A and creates a new item on List B for each row entered onto the repeating table. This works great, but if a new row is added to the repeating table and then a user saves the form, all existing repeating data plus the new entry will be copied to List B thus creating duplicate data.

 

The repeating table has two fields, Client ID and Client Name. I would like to find a way to use the query List function on List B and check the Client ID against the existing values on the list and not add if it's already present. 

 

Here is a screenshot of my existing workflow - I'm unsure of how to utilize the query list function and what else could be employed to prevent duplicate entries.

 

I appreciate any help!

 

20608iE79486FEECF10BC1.png

 

icon

Best answer by Garrett 8 November 2021, 17:52

View original

3 replies

Userlevel 6
Badge +16

1. Before you "Create List Item", check whether the Item exists in List B.
If (Item Exists in B)
    Do nothing
Else
    Create List Item



2. Use "Query List" action item. 


 


You should return a variable with the values 0 (Item not exists) or 1 (item exists).


Use this variable to check in the Conditional Branch.

Badge +2

Thanks for the response! I wasn't sure if a "Run If" was the appropriate route. I will try to implement this solution and if it works, I'll mark this as the solution.


 


I appreciate the prompt response 🙂

Userlevel 6
Badge +16

@Jamreed wrote:

Thanks for the response! I wasn't sure if a "Run If" was the appropriate route. I will try to implement this solution and if it works, I'll mark this as the solution.


 


I appreciate the prompt response 🙂




You're welcome.
Yes, you can use "Run If". It should produce the same outcome.

Reply