.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

Problem with [ID] in TITLE Field.

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

On my TITLE column, I have set the default field as: "SPF-FW2010-&[ID]" ... however the error is that the [ID] is not being pulled from the existing [ID] field (that is the unique number that auto-increment). How can I go about solving this?

My desire output should be example:





... and so on.

Thanks in advance.

View Complete Post

More Related Resource Links

Compare Validation for the Title field of the list

Hi, I do have a field known as 'Title' in the list.My requirement is there should be not be any duplicate values i.e first time if i enter say 'test' in Title field it should save where as second time when i enter same text as 'test' it should show message as 'item already exists with the Title that you have entered'.Ofcourse i should do the compare validation over here but just let me know how to do this Thanks & Regards, Sudheer

Problem with CQWP "There is a problem with one or more of the field values below"

Hi, I'm trying out the content query webpart combined with content types. First I created a new site collection. In this site collection, these are the steps I did: - I enabled "SharePoint Server Publishing Infrastructure" feature at the site collection level - I enabled "SharePoint Server Publishing" feature at the site level - I created a new site column "Is Meat Eater", which is a yes/no field and added this to a new custom group called "Zoo" - I created a new content type called "Zoo Animal" that inherits from "Item" in category "List", and added this to a new custom group called "Zoo" - I added my site column "Is Meat Eater" to this content type (so now I have Title + Is Meat Eater) - I created a new custom list called "SharePoint Zoo" - I enabled content types on this list - I added "Zoo Animal" from the existing content types - I removed the default content type "Item" from the list (so now only 1 content type left, my own) - I added a few animals in the list - I added a content query web part on the homepage - As source I chose "Show items from all sites in this site collection" - As List Type I chose "custom list" - As Content Type Group I chose "Zoo" - As Content Type I chose "Zoo Animal" - I hit apply at

Problem when deployind ContentType: Error occurred in deployment step 'Activate Features': Field t

Im getting this error when i try to Deploy my ContenType: Error occurred in deployment step 'Activate Features': Field type GUID is not installed properly. Go to the list settings page to delete this field Does someone know how to fix this error? The ContentType is defined as: <     Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!--Site columns--> <Field Name="Test" DisplayName="Customer Subject ID" ID="{38A9E5BA-62FF-4F3B-90E3-F9961FEABE20}" Type="Text" Required="FALSE" /> <!--Parent ContentType: Item (0x01) --> <ContentType ID="0x01004317ec735b25468583d7470aa17c36ae" Name="NextContentTypes - NextCustomerContentType" Group="Next Content     Types"Description="NextCustomerContentType" Inherits="TRUE" Version="0"> <FieldRefs> <!-- References to field difinitions --> <FieldRef ID="{38A9E5BA-62FF-4F3B-90E3-F9961FEABE20}" Name="Test"></FieldRef> </FieldRefs> </ContentType> </     Elements>

Problem updating a boolean field

I have a button in a listview that updates a boolean field for the selected record. The button calls a method (ObsoleteOffice) in my BLL that sets the field (IsObsolete) to true...please see below for the code. However, the IsObsolete field never gets updated, nor does it throw an error.  In addition, the method works with string fields just fine, but nothing happens with the boolean field.  I would be grateful if anyone could shed some light on what I am doing wrong. Thanks.   //Method: ObsoleteOffice [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public bool ObsoleteOffice(int officeID, bool isObsolete) { offices.OfficesDataTable offices1 = Adapter.GetByOfficeID(officeID); if (offices1.Count == 0) // no matching record found, return false return false; offices.OfficesRow office = offices1[0]; // office.DateModified = DateTime.Now; office.IsObsolete = true; //Update the office record int rowsAffected = Adapter.Update(office); //Return true if exactly one row was updated, otherwise false return rowsAffected == 1; }  

Merge Replication and "Field size too large" problem

Hi,I have a single table database for tests configured on my server, I create another database using the same script that I use on my server on another server. I made a several inserts on the first database and I configure a merge replication between the two server and on the table article configure 2 integer columns to not be replicated and configure @pre_creation_cmd to none, because if I use another configuration on @pre_creation_cmd , when the snapshot applied it must recreated my table without the columns and I need then on another server. When I set @pre_creation_cmd  to none I need to create a rowguid column on the another server. My server is the Publisher and my another server is the publisher. I create the snapshot and when I sinconize the databases, the sinconization return that error:=================================================================================================The process could not bulk copy into table '"dbo"."CONSTS"'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)Get help: http://help/MSSQL_REPL20037 Field size too large (Source: MSSQLServer, Error number: 0)Get help: http://help/0 To obtain an error file with details on the errors encountered when initializing the subscribing table, execute the bcp command that appears below.  Consult the BOL for more information on the bcp utility and its supported options. (Source:

How can I remove/hide built-in Title field in list definition

Now I'm customize a new Content and then new List Template, just like below definition;  <ContentType ID="0x0100ed096ab35eeb4d2e98fb71b9842e9616" Name="Staff Member" Group="Berry Gardens Internet">  <FieldRefs>   <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" />   <FieldRef ID="{F5E777EA-C083-4c2f-BC10-E4BF2B4D6372}" Name="Synopsis" />   <FieldRef ID="{2307576C-A060-4c2d-BABC-34E5A9924667}" Name="Image" />   <FieldRef ID="{051B830A-8105-4384-9AA1-103CEE43B760}" Name="Email Address" />  </FieldRefs> </ContentType> It is inherit from Item parent type, and using built-in Title field({fa564e0f-0c70-4ab9-b863-0177e6ddd247}), but I found that it's diffcult to remove/hide it. When in the default list view, there are two Title fields. So what can I do in the list definition. Regards upzone    

Workflow - automatically create discussion item using title field of of custom list item as its subj

Anyone any ideas as to how I can configure SharePoint to create a discussion item using the title of a list item. e.g. user creates list item on a custom list - SP automatically creates a Discussion thread for this list item in the discussions list. I'm guessing this can't be down OOTB . would I be looking at SPD or a coded solution ? regards, Counie

google map custom field type Rendering problem


Hi all,

I have rebuild the codeplex project of googlemapfield in visual studeio 2010 for sharepoint foundation 2010.It is able to show custom field when adding new column. I am unalbe to get  google map in display form.. I don't know where it went wrong. I am able to load a text pargaraph from control template file which is delcared in <div> as <p><cite>The Complete Manual of Typography</cite>, James Felici</p>. But not google map.

I have added safe control in web.config file and also enabled activex control scriptings in IE.

Here is my .ascx file code

<%@ Assembly Name="GoogleMapField64,Version=, Culture=neutral, PublicKeyToken=268a24657b14d504" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" 

Rich text editor for Title field in Publishing site


I have one French publishing site. I want to set one page title like this: see BOTOX trademark here . To show title like this i need to put tag like Product <sup>MC</sup> . Problem is, if i put above tags in title text box at the time of page creation then page title showing Product <sup>MC</sup> not  like above site.


Regards, Sandip Patil, .Net,Sharepoint Developer www.worldofsharepoint.com

When adding new calendar item the title field is missing - MOSS 2007



A staff member just noticed that when adding a new item to a vacation calendar we have set-up - the Title column is missing.  They will finish creating the new calendar item and then when they go to edit it the Title column appears and they can fill it in.

Can figure out what caused this or how to fix - any ideas?

When I create a new test calendar the title column is displayed properly when creating new item - so not sure what happened with this calendar.

Hope someone has come across this before.

Thanks so much!

Problem with calculated field in SSRS

i have the foll scenario:
col1 col2 col3 col4 
A   1  100 
   2  250 150 
   3  500 250 
   4  600 100 
   5  900 300 

For col4 i need to calculate the difference b/w (the value in current row in col3 i.e. 250) - (the value in the previous row in col 3 i.e.100). i need to do that for all rows of col4. I need help with the expression to do this in SSRS.

Cross site lookup field value contains the parent list item id and the title field separated by ;# i

Actually we are using third party component for cross site lookup and facing the problem with cross site lookup field value. Its showing the correct value in default list view mode, but in "Edit in Datasheet" and "Export to Datasheet" view cross site lookup field value contains the parent list item id and the title field separated by ;#. I need the actual value in "Edit in Datasheet" and "Export to Datasheet" view as shown in default list value, i dont want that appended parent list item id and separated by ;#.

Is there any OutOfBox soluiton for this. Please suggest me for the same.


How to use Title field instaed of name field for a publishing page in the browser title bar


Hi All,

             I want to display the page title field in the browser title bar instead of page name field. Is there any way to achive this.




Lookup field which allows multiple choice - problem when query with CAML


I created one simple list and added one column - lookup - I've chosen some source list and field, then marked "Allow multiple choice". I created new item in that list, by adding more than one valie to that coulm.

The problem is, when I use CAML query, that column has such values:


and it's suppose to be like this:


do You have any idea, why it doesn't query first ID?

Update Existing Sharepoint List's field Problem



This is about sharepoint sequential workflow using visual studio.

I ve a prob to updating existing sharepoint list's field on the basis of other field(id or somthing else), using visual studio.

I m updating sharepoint list but its adding a new row below at last in the sharepoint list.

i m having a UserID(lots of user's ID) field in the sharepoint list, on the basis of this userID i ve to update a perticular field corresponding to UserID.

Please tel me wat type of code i ve to mension.


Thanks in advance !

Regards- Sharad

Add an auto incremental value to TITLE field.


Hi, i am currently working on a custom list in SharePoint 2010 and there is a title field. I would like to append an auto incremental variable to "Request" to make it look like:

Request 1

Request 2

Request 3



and so on...

As you can see below, i tried to use the calculated value Request+ID, but it didn't work out. So is there anyway to solve this problem?


<input name="ctl00$m$g_0bb0fcf5_65ea_4af9_ba76_7c0babad1a82$ctl00$ctl05$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$TextField" type="text" value="[Request-]&amp;[ID]" maxlength="50" id="ctl00_m_g_0bb0fcf5_65ea_4af9_ba76_7c0babad1a82_ctl00_ctl05_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField" title="Title" class="ms-long ms-spellcheck-true" /><br />

Problem in properties.AfterProperties with respect to DateTime field.

Hi all,

I have an event handler, ItemAdding and I am trying to get start and end for "Calendar List".

For,  StartDate = Convert.ToDateTime(properties.AfterProperties["EventDate"]); its showing next day.
For e.g, User took 5 day vacation from 12 Jan to 16 Jan. But for StartDate its showing 13 Jan and also for end date i.e. 17th.

I tried some reserach on about this issue: 

But in my case, properties.ListItem is null.
SPListItem currentItem = properties.ListItem;
DateTime beforeValue = System.Convert.ToDateTime(currentItem.Fields[displayName].GetFieldValueForEdit(currentItem[displayName]));
properties.AfterProperties[internalFieldName] = SPUtility.CreateISO8601DateTimeFromSystemDateTime(beforeValue.AddDays(1)).ToString();

This is my complete code for ItemAdding

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