I'm looking for something like Composite unique indexes in Sharepoint 2010. I have found that I can make some field in list unique. But how to make unique index composed from two or more cols in list?

If there is nothing like composite unique indexes in Sharepoint what is the best way how to simulate this functionality? List event reciever and check in ItemAdding event? Or some better solution exists?


Hello Michal: There is nothing out of the box that would offer that functionality. Indexes are unique on a per column-basis and each column index is independent. The ItemUpdating event receiver is the best place to do this. You could simply have the event receiver query the list to see if a duplicate record exists before the item is created or saved.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.