Create Custom Field type as "Primary Key"
How to create a custom field type for new Column? It should not allow duplicate entry and NULL values for list or document library column. Check users input against the other values from the same column in the list, to verify is it unique, or not? This "Primary key" - custom field type must appear while creating field with other column types (like "Single line of text" or "Multiple lines of text" or "Choice" or "Number" or "Currency".. etc) I am using MOSS 2007 Thanks in advance
October 29th, 2010 1:59pm

Hi, This feature is not OOB in SharePoint 2007. You got two custom options, 1) Create a custom Event receiver on ItemAdded event and checking if the value already exists and display message 2) Using JavaScript you can also do the same http://sharepointjavascript.wordpress.com/2009/11/23/sharepoint-lists-or-document-librarys-primary-key-in-selected-field/ Primary Key feature is OOB in SharePoint 2010 custom lists. Go to Custom List àRibbon àList Settings à Click on the column where you need to apply the primary key. In the column page Check the radio button for enforcing unique values in this column. HTH Thanks, Skancharla
Free Windows Admin Tool Kit Click here and download it now
October 29th, 2010 2:55pm

How to Create a Custom Field Type http://msdn.microsoft.com/en-us/library/bb862248.aspx Preventing Duplicates: http://www.google.com/search?q=SharePoint+List+Prevent+Duplicate Steve Clark, MCTS | Twin-Soft.com
October 29th, 2010 2:58pm

Thank you Skancharla and Steve. I found similar post but there is no description or steps on how he created custom field? http://blog.sutor.ws/2007/09/30/PrimaryKeyFieldForMSSharepointV3AsCustomField.aspx As per this post it is duable HR
Free Windows Admin Tool Kit Click here and download it now
November 1st, 2010 3:27pm

Hi, As stated above it is duable, but not OOB in SharePoint 2007. This feature is OOB in SharePoint 2010. Here is a smiliar thread, http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/3a6342b3-ce06-4be1-af0d-7daf12ca4d51 Other links for creating custom fields http://msdn.microsoft.com/en-us/library/bb684919(office.12).aspx http://www.sharepointkings.com/2010/06/creating-custom-field-in-sharepoint.html http://sumansharepoint.blogspot.com/2008/08/how-to-create-custom-field-types.html HTH. Thanks, Skancharla.
November 1st, 2010 5:45pm

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

Other recent topics Other recent topics