.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

Choice columns in SharePoint List

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :SharePoint


I have created a simple list with a "Choice" column, i have three entries in my dropdown

First Entry

Second Entry

Third Entry.

When user creates a new item, default value in the drop down  is blank, i want user must select a value, so i have selected "Required value" option for tihs column, no if user try to save with blank value in the dropdown, a requried field error is displayed.

Is it possible if i add "Please select a value" in the drop down as first value.

View Complete Post

More Related Resource Links

Creating List Definitions with Custom List Columns for SharePoint Server 2007

Learn to use Visual Studio 2008 Extensions for Windows SharePoint Services to create a SharePoint list definition that implements custom list columns.

Query Sharepoint list, rich text columns returning HTML tags

Hi! So I have an issue that maybe someone of you have encountered as well. I am querying a Sharepoint list and creating a report from the data collected from this list. This all works fine except that one of the columns in this list is of the type "Multiple lines of text" and also supports "rich text" with different fonts, sizes and so on. This has the effect that the text returned from this column is wrapped in HTML tags that specifies how the text should be formatted. Naturally I do not want this HTML code to appear in my report so for now I have used custom code to do a string.replace and replaced for example <div></div> and <br> with "". However, this column also has url references to documents and these links shows up like this "/servername/site/subsite/Gemensamma%20dokument/Mwh.docx">http://servername/site/subsite/Gemensamma%20dokument/Mwh.docx There is some sort of double reference to the document that I guess like the HTML tags are embedded in the answer from the rich text column and this is not so easy to do a string replace on because the url varies with the different document and document names. My question really is if anyone of you have done a similar report that I am doing, and have encountered this fenomen with this sharepoint column and how you did to solve this? I have tried to creat

Lookup columns in a SharePoint Custom list

Hi, I would like to know the maximum lookup columns we can create in a SharePoint Custom list. Thanks and regards, Usha   

Auto Populating SharePoint List Columns based on value in one column

   I have a SharePoint List where I want to auto populate the value of some of the columns from another List based on a field "Title" which is primary & unique....
   I want to auto populate them when clicking "New Item"  and entering data... you put the "Title" value and it should match the Title value from another List and auto-populate some the columns...

   Please any idea would be highly appreciated....

Thanks in advance

Using Infopath 2010 to customize a SharePoint 2010 list with columns using Managed Metadata


Hello All-

I would like to customize the "new" form on a SharePoint list that has some columns that use managed metadata term sets as options.  Unfortunately, when I do so, I get the message:

"InfoPath cannot generate a form template for the SharePoint list."

The following fields in the SHarePoint list are not supported because of their data type and will not be available in InfoPath Designer:

-MyColumnName (TaxonomyFieldTypeMulti)

This error message seems to be pretty self explanatory, but it boggles my mind that this would be the case.  Can I really not customize my list "new" form in Infopath if I am using columns with managed metadata?  Any workarounds?

How to delete the default columns( All day Event field ) from the Calendar List in sharepoint?



Is there anyway of disabling the All day Event field in a Calendar list. I don't have the option to hide it either.

Any help appriciated...


Srikanth Reddy

Clear Selected Filter on SharePoint List Filter / Choice Filter Webparts


Hi All,

   I am using a 'choice filter web part' and a 'Share Point List Filter web part' on a page to filter other web parts ( Lists / Data view web parts).

   The filters are working fine, but once a filter is selected there doesn't seem to be a way of showing all contents back ( that is clearing the selected filter) . The selected filter remains even if we refresh the page !!!

 Any suggestions as on how we can have the option of 'show all' or 'clear filter' for  Choice Filter web part .


Microsoft.SharePoint.SPException raised when adding Columns to List



In my Site Collection root web site, I have created a new Task list under Site Actions -> Create.

This Task list creates the default SharePoint 2010 Task List with two content types, Task and Summary Task.

However, If I go under List Settings -> Columns, Add from existing site columns, the following Exception is raised in the ULS Logs:

Microsoft.SharePoint.SPException: Field type CHOICE is not installed properly. Go to the list settings page to delete this field.   
 at Microsoft.SharePoint.SPFieldCollection.CreateSPFieldFromSafeArray(Int32 index)   
 at Microsoft.SharePoint.SPFieldCollection.CreateSPField(Int32 ifld)   
 at Microsoft.SharePoint.SPFieldCollection.EnsureSPField(Int32 index)   
 at Microsoft.SharePoint.SPFieldCollection.ItemAtIndex(Int32 iIndex)   
 at Microsoft.SharePoint.ApplicationPages.AddFieldToContentTypePage.OnLoad(EventArgs e)   
 at System.Web.UI.Control.LoadRecursive()   
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Can anyone provide any suggestions as to what may be causing this?



Drop Down menu connected to Sharepoint list with multiple columns




I have a sharepoint list with 2 columns (employee name and employee phone #).  Is there any way to have a drop down list with the employee name and then right next to it have a text box show the employee telephone number?  i.e. if I choose my name from the drop down list, my phone number will show up right next to my name.  Thanks!



C#: How to Add Item to SharePoint list using web services? One of the field is a choice field.


I have a code that looks something like this:



batch.SetAttribute("OnError", "Continue");
batch.SetAttribute("ListVersion", "1");
batch.SetAttribute("ViewName", "{GUID of my View}");

batch.InnerXml = "<Method ID='1' Cmd='New'>" +
"<Field Name='Title'>Something</Field>" +
"<Field Name='Status'>Something Else</Field> </Method>";

myList.UpdateListItems("{GUID of my List}", batch);


the field name "Status" is a choice field. When i execute this code, my program doesn't add anything to my sharePoint List. However when I remove the 

"<Field Name='Status'>Something Else</Field>

which means i'm left with this code:


Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

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

Sharepoint Blog Post List Renaming in onet.xml


Ihave created a Site definition and added a Posts Listview in the same.

<View List="$Resources:core,lists_Folder;/$Resources:core,blogpost_Folder;" BaseViewID="10" WebPartZoneID="Left" WebPartOrder="1"/>

This list is created using my own schema.xml which i have copied from the Blog site template.

I wanted to rename the title of the list [not Title field] which is coming to be Posts right now.

Is there anyway to do it?

Any help appreciated


Is there a list of the Accessibility Acts that SharePoint supports?



 Is there a list of accessibility acts that SharePoint 2007 supports.
 For example the Accessibility for Ontarians with Disabilities Act, 2005?


Thank You

Sarbjit Gill

How to join two sharepoint list in c# by CAML query?

Hii All,
   I am using wss 3.0 and i have one site and site has 4 to 5 lists. lists are interconnected with lookup column and same column. I need to display some column fron one list and some from another.. i need to join that lists by where condition like project =project..

So how can i join??

Thank You
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