How to make a custom column unique in sharepoint?
in sharepoint i created workflow, and in tasks lists i added 3 custom columnsmy requirement is in those 3 , 1 column should be unique, For example, i added columns, empId,name dept, in those empId should be unique, if any one who enter the same empId while creating, it won't accept,is it possible?any ideas, thanks in advance
May 14th, 2007 2:52pm

The only unique field I know of is an internal ID field but users cannot enter any data. You could make this field a content type and create another workflow that checks all the other entries to see if the one being entered is unique.
Free Windows Admin Tool Kit Click here and download it now
May 15th, 2007 2:27pm

Well, There is a way around. You can make use of event handlers so whenver someone adds a item to a list, you can call your code to check if the column value already exists and prompt a message to enter a new value.
May 25th, 2007 10:01am

hi Naveedullah Khanthanks for the reply, i solved this problem by using eventsthanks
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2007 11:09am

hi,but i don't know why you are trying to map with Managed Property.to find a column unique or not what is the need to do above process?if you add custom column in a list, it should be in the lists, if it is not visible in the default view thenfollow this link.http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1689192&SiteID=1if you want the code, how to check the column is unique or not through events see herehttp://www.codeproject.com/spoint/ExtendingSPS.asp?print=truedownload the code and let me know if any issues.thanks
June 14th, 2007 12:40pm

Hi, I too got requirement like this. We need to validate a column "Doc No" for unique value. If it is already existing then, a message needs to be displayed. Can you pls share the code for it & what are the steps involved in it.
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2007 11:25am

Seems to have absolutely nothing to do with search. Moving to Admin (rather than wf)WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx
July 19th, 2009 10:28pm

Hello, for those who feel that unique constraint is not needed...mmm...it is by many!!!Sometimes we depend on user input to make a list that is "plan-of-record" or "keys" for business processes. It cannot be pre-entered into a drop-down list because the information is not known ahead of time...it is the user dynamic process (not static).That is a missing feature that should have already been in SharePoint and it is going to be offered in 2010 I am reading. Sure we can code and delivering a validation handler to production, but, that costs money! And, that would have to been done for every new field being made in the site where the user needs that (so much for OOB benefits).
Free Windows Admin Tool Kit Click here and download it now
February 12th, 2010 7:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics