Wednesday, October 1, 2014

How to stop duplicate entries based on two or more columns in a SharePoint list?

Well, there is no OOTB support of that.

Quick search leads to two solutions: coding (event receiver) or InfoPath rule.

The cost of "coding" is high. We need developer to build it, need someone to manage the source code, and need to upgrade the assembly when upgrading SharePoint. And, the deployment will cause farm outage!

InfoPath solution also has its own problem: it is always with expensive "license" fee.

So, is there simple approach to resolve the problem?  Below is how I did it, with a simple declarative workflow.

The workflow doesn't prevent "duplicate entries", but can generate warning message, so users can fix the invalid data after the remind. That's good enough in most of the cases.


  • The structure of the test list (CombinedKey = Title & ProjectCode)



  •  Declarative workflow triggered by "new item" and "edit item" event


  •  Test result

Any comments are welcome!

2 comments:

  1. THANK-YOU so much for taking the time to create this easy-to-understand post!

    ReplyDelete
  2. please could you elaborate on this, its the only post I have found that does what I need but returns its own item ID instead of the duplicate items ID.

    ReplyDelete