Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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