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 7:52am

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 7:27am

oh my god,if really it is the case, it's really horrible thing,they allowed to create custom fields, but no constraint option.any way thanks garythanks once again
May 15th, 2007 8:42am

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.
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2007 3:01am

hi Naveedullah Khanthanks for the reply, i solved this problem by using eventsthanks
May 25th, 2007 4:09am

would you mind sharing how you solved the problem using events? I have the same problem. thanks!
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2007 12:29am

Hi!Do me a favor. I created the custom column. But, I couldn't find the newly created custom column when trying to map with Managed Property. I did what the following article said but I couldn't pass over step 4. Newly created custom column doesn't show under Select a crawled property.http://www.jjfblog.com/2007/01/searching-custom-column-values-in-moss.html 4. This is a cool little widget in that you can actually search for the property you are looking for, in this case "Department". So enter "Department" in the "Crawled property name" text box and click "Find" Code Snippet What's wrong with me?Thanks in advance
June 13th, 2007 3:45am

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
Free Windows Admin Tool Kit Click here and download it now
June 14th, 2007 5:40am

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.
October 25th, 2007 4:25am

Try this solution.Sorry post in RussianIf you cant understand use automatic translate http://mossdevel.blogspot.com/2009/07/sharepoint-unique-column-pk-using-event.html
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2009 3:00pm

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 3: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 11:51am

You can make any column unique on a list by list basis using an information management policy.
March 7th, 2012 11:07pm

To make a spesific column unique in visual studio in sitefields there is elements.xml right. write these into your column which u wanna make it unique. EnforceUniqueValues="TRUE" Indexed="TRUE"
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2012 3:21am

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

Other recent topics Other recent topics