.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Using EnforceUniqueValues for Built-in column in Custom List.

Posted By:      Posted Date: September 12, 2010    Points: 0   Category :SharePoint
Hi All, I am back with a new question J.   I am using a built in field (Title GUID - FA564E0F-0C70-4AB9-B863-0177E6DDD247) in a custom list. The requirement is to have this field unique, so I thought of using EnforceUniuqeValues property of SharePoint 2010. Unfortunately this is not working when I set this property to true in list schema.xml. there is no exception or error, the list gets deployed properly however the field is not set to unique. Code looks like:              Sealed="FALSE"              Indexed="TRUE"              EnforceUniqueValues="TRUE"              AllowDuplicateValues="FALSE" />   If I try using the object model (as mentioned in documentation http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfield.enforceuniquevalues.aspx), I get SPException while updating the field. I however can set the field unique from UI after the deployment. The SharePoint documentation on this property says it cannot be set for built in columns. Then I wonder why it is allowed from UI.   Please suggest if anyone has any clue on this. If at all it is possible to programm

View Complete Post

More Related Resource Links

Picker returns nothing for BDC column in custom list


Playing with the BDC for the first time, running into some issues adding a Business Data column to a custom list.

I believe my ADF file is solid. I've been able to import that just fine and can use the application to drive various BDC-specific webparts (a Business Data List or Business Data Item, for example). It also seems to work when I manually enter information in my NewForm.aspx field and click the Check Names button (it verifies my entry and underlines it, creates link to profile when I view the list data).


If I try to use the picker, I get nothing. Enter a name I know is valid or a % and click the magnifying glass icon and I very briefly get the "Please Wait" message, then just an empty set with "Type into the search box above then press "Enter" to start your search" where my results should be.

Any pointers? Thanks.

Cannot delete custom column in calendar list - 'unknown error'

I've created a column in a calendar list and now cannot delete it.  I've cleared all data and I still get the "Unknown Error" message when I try to delete. jan

Best way to display data of a single column from a Sharepoint Custom List

I'm trying to create pages that will automatically populate with data pulled from a sharepoint list (like title, department, contact info, etc.).   I'm using publishing pages. What would be the easiest way to do this, and how would I specify which data to pull from the list? For example, the page would be set up like this: [Title:biology] [Department:biology] [Contact Info:biology]   and when the page loads, it would look like this: Biology Lab Biology Department 123-456-7890   I want it to just pull the data -- I don't want a list view or anything like that.  I need this page to look pretty, and I need the each column's data to show up in a very specific place. How could I make pages that would do that?

Custom user selection in Person or Group type column as per other list.

I have two list in the Sahrepoint Foundation 2010 site. 1) Projects with Title and members(Person or Group - multiple selection) 2) Tasks (Team site default)  - added lookup column Projects form the first list (required) Now I want to assign task given users in the projects list. ex. I have users A,B,C,D,E and Two Project P1 and P2 I have defined that P1 project has users A,B,C so task is distributed/assigned between this members, not to D and E I need some validation or lookup which restrict selection or D and E.   Thank you.  

Problem while creating a column in custom list

I am using sharepoint 2010 beta2

I tried to create a column in custom list using a button in ribbon as well as in list settings page

After filling the data and clicking on 'OK' button I am getting a JavaScript error and form is not being submitted

Javascript error details:

Message: 'undefined' is null or not an object
Line: 1423
Char: 4
Code: 0

SPD 2010 - Custom Buttons or Hyperlinks in List column - need your advice



This is probably obvious and I am missing it but if we ignore the view's builtin  capability to add an Edit Link for each item in a list,  I am trying to add my own column to my XsltListViewWebPart that would display a hyperlink or button that says "Edit" or "signup" or whatever and have it call up the EditForm for that item.  Is there step-by-step documentation showing something similar?

Thanks for any advice,



SPD 2010 - Custom Buttons or Hyperlinks in List column - need your advice



This is probably obvious and I am missing it but if we ignore the view's builtin  capability to add an Edit Link for each item in a list,  I am trying to add my own column to my XsltListViewWebPart that would display a hyperlink or button that says "Edit" or "signup" or whatever and have it call up the EditForm for that item.  Is there step-by-step documentation showing something similar?

Thanks for any advice,



Using Workflow Initiation Form to Modify the Value of a Lookup Column in a List Using a Custom Looku



I am trying to develop a workflow and an associated initiation form that will allow a user to update a column in a list that is a lookup column. I have code working so that the lookup options are being properly pulled from the list and populated in the drop down on the initiation page. However after  completing the initiation page and starting the workflow, with a value selected in the lookup list, the value does not get properly updated; it appears to be updating with a null value.

The following is my code for the XOML and Initiation ASPX file. The name of the Lookup Column is "Primary Technical Category" with an XSLT name of "Primary_x0020_Technical_x0020_Ca." The Initiation Variable is also Called Primary Technical Category (PrimaryTechnicalCategory without spaces as SPD renames it). 

I would greatly appreciate any assistance!

Thanks, Michael

XOML File:

<ns0:RootWorkflowActivityWithData x:Class="Microsoft.SharePoint.Workflow.ROOT" 

Custom Form Fields not appearing in Workflow Tasks column list when try to Update List Item


UPDATE:  This problem seems to be solved by closing and reopening the Workflow xoml wizard.


I have created a 3 step workflow and at each step I have a Collect data from user task that I use to Update my list item.  I actually have 4 options (If Else clauses) per step and for each option I have to collect the same data from a different user.  So I'm aiming at using "Update list item" 12 times in this workflow.

I have been developing this workflow over some days but the Custom Form Fields that I create in the "Collect data from user" task are not always available when I try to "Update list item".  By which I mean, I try to specify the "data source and field to perfom the lookup on" and I can select the "Workflow Tasks" list but the field that I just created in the "Collect data from user" task does not appear in the fields list!!!

I can't determine why a field doesn't appear.  I have tried using no spaces or special characters, keeping the name of the field short but for some reason my newly created field doesn't appear in the list.  The field does appear in the content type when I look at the settings for the "Workflow Tasks" list and the field appears in the "Workflow Tasks" list of columns and the site content type.&n

Assigning Custom Permission Role to a List Column in MOSS 2007

I have created three custom roles: Role1, Role2, Role3.  I have a user list with permissions column.  This permissions column has three choices in a dropdown list.  I want to associate each value in the dropdown list to a custom role (Role1 or Role2 or Role3).  This way, when I create a new user, I would just have to pick a value in the permissions column.  Oh Yes, I am using MOSS 2007.

Default Value for 'Person or Group' column in a Sharepoint 2010 Custom List



In Sharepoint 2010 I have a Custom List with a column of the type 'Person or Group'.
I would like to have a default name for this 'Person or group' column.
So when a user creates a new list entry and leves the 'Person or Group' column value blank the list entry should be created with the default value für the 'Person or Group' column.

Is there a way to schieve this?

Many thanks in advance.

Roberto Rocco.



Custom list -- control issue with column type "Choice" and Infopath 2010

I finally got our project lead to abandon external SQL lists, so now I've created custom lists in SP 2010. I have some columns that are of "Choice" type/"Display as radio buttons" (customer requirement). When I start Infopath 2010 locally and create the data connections to the list(s), those choice fields display in I/P as dropdowns. If I change the control with a right-click to "Option Button", I only get one -- I need 2 (yes, no) or, in a few upcoming cases 3 or 4. BTW, same with changing the control to a check box -- only get 1. FWIW, I get the same results if I start Infopath directly from the list in SP Designer 2010. Any ideas?
Joel W. Johnson

How to merge two columns data into a third column (text fields) in a custom list? is it possible to



I am wokring with MOSS 2007 environment.

In one of the sites I have a custom list which has the following columns

1. Report Title - Hyperlink

2. Description - Multiple lines

3. Created date - date


The requirement is to merge the "Report Title and Description" and show it in a third column which will be inlcuded in the custom view.

Report Title                           Decsription                                                                Created date

XYZ                           Test Report which needs to be deployed                 01/01/2011


This needs

Sharepoint List Column Custom Colors With Group By column Option


I have tried to implement the custom coloring or manipulating data on columns in multiple ways like





However, all the above does nto work if you enable the "Group By" column option in the "Modify View" settings. It does work if the "Expanded" option is checked, however, it does not when "Collapsed" option is selected in "Group By" options.

Any help will be appreciated.

DataGrid: Tailor Your DataGrid Apps Using Table Style and Custom Column Style Objects


One of the most enduring challenges in writing user interfaces is figuring out how to display large amounts of data efficiently and intuitively without bewildering the user. The problem becomes particularly thorny when the interface must reflect hierarchical relationships within the data that the user needs to modify. The Windows Forms DataGrid control gives developers a powerful and flexible tool to meet this challenge. This article explains its basic operations and shows how to extend the DataGrid to display columns of data in an application-appropriate manner.

Kristy Saunders

MSDN Magazine August 2003

How to add custom list entries to mysite's calendar in Sharepoint 2007 site?


I would like to know below things

(1) How to create MySite for one specific member with other or administrator's access?

(2) Scenario : Administrator have created one SP2007 site. now Administrator have created one calendar (Sample calendar). Administrator have added some entries in calendar. now one user entered in portal site ansd view the calendar and he click on MySite menu. so this sample calendar entries should enter in that user's mysite calendar. How this can be achieved?

Thanks in advance.
Regards, Praful Udade
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend