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

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

Value disappear when using Calculated column based on ID column.

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#

I have a calculated column with formula as ="Cust"&ID. The value of the item would be "Cust100". But it a user edit the item, the value of the item of the column would be "Cust". The ID will be missing. (SharePoint 2010)

Any idea?


View Complete Post

More Related Resource Links

Calculated column based on other columns in Lookup list selection


.. if that makes any sense.

I have a list with with lookup column to another list. that list has other columns.

I want to add a calculated column on the parent list, that set it's value to column from another list, but based on my selection in the lookup column of the parent.

Possible? presuming the calculated column  gets set when I submit and not interactively? what if edit the data and change my selection?


How to filter the search result based on a column value?

I do have search scope scoped at a list which contains attachment. I will use this scope to search (full text search) on this list then I need to filter the result based on a column which is in the same list. How do I do that? Thank you.

How to get character count in 'Multiple Text 'column using Calculated Column?


Hi All,

I have a multiple text box in a list

I want

  • A column which lists number of characters in multiple list column example 188, 199 etc
  • Multiple character column must not have more than 200 chars
Is this possible?

Appreciate all the help!


Trying to set Calendar Time Interval Using Calculated Column, but getting Error



So i was trying to use a calculated column that added 7 days to the start date of a calendar item. The calculated column worked fine because i checked with several tests. Then i tried using the Column as the End Time in the Time Interval Setting in the Calendar View. This broke Sharepoint. Not the normal graceful error im using to seeing from Sharepoint but the Server Error Page when a dump happens in a ASP page. I havent enabled the full error page because i assume its not like i can fix it, i dont have the source code.


Does anyone else experience this? If so is it a known problem and being worked on?




computed column specification - When is it calculated?

on insert , select...?  It's better than Trigger? thanks.  

Sharepoint: In Calculated Column, Code with multiple "IF" condition does not work.

Implemantation:  Calculate expected resolve date exclude "Saturday" and "Sunday"  based on Priority and Severity.Columns are:1. Priority:2. Severity:3. Raised on: Date record createdCode: Below is the code which contains multiple "If" conditions. For quick undersatnding, i separated major If condition. Below code does not work and sharepoint gives me Sytax error message. =IF(OR(Priority="Critical",Severity="Critical"),IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+3,[Raised on]+1),     IF(OR(Priority="HIGH",Severity="HIGH"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+4, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+4,[Raised on]+2)) ,   IF(OR(Priority="MEDIUM",Severity="MEDIUM"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+5, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+5, IF(TEXT(WEEKDAY([Raised on]+3),"dddd")="Saturday",[Raised on]+5,[Raised on]+3)) ) ,   IF(OR(Priority="LOW",Severity="LOW"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+6, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+6, IF(TEXT

Use Sharepoint Calendar Start Time field in calculated column

I'm trying to limit the calendar view to current week using the Sharepoint defined field Start Time. However, when I display the serial number behind the Start Time it looks like it is actually giving me the serial number for the Created Date field. I believe it is because the appointment is reoccurring but I'm hoping there is a way around it. I created a new testdate field and manually entered the date and set those appointments as all day events however they are not reocurring appointments. The testdate returns the correct serial number however the start time returns an incorrect serial number. SerialNumber1=DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time])) SerialNumber2=DATE(YEAR([testdate]),MONTH([testdate]),DAY([testdate])) Start Time  SerialNumber1 Testdate  SerialNumber2 8/31/2010 40420 8/31/2010 40421 8/31/2010* 40405    9/1/2010* 40405    9/2/2010* 40405    9/7/2010 40427 9/7/2010 40428 9/13/2010* 40405    9/14/2010 40434 9/14/2010 40435 9/14/2010* 40405    9/15/2010* 40405    *These are reoccurring appointments scheduled as all day events. The others were entered as one time appointments scheduled as all day events.

using [content type] in calculated column

I want to get the content type in the calculated column. [content type] is available in Moss not able to use that in 2010. Any idea?

Problem when using calculated column as column group in a view

Hi,   I have a list with a calculated column named 'FullName', the formula is: "FirstName & " " &  LastName". I created a view group by 'FullName' column. The follow error appeared on the column:   <!-- #RENDER FAILED -->   Please help

Weird Date vs Date/Time issue using a calculated column

I'm attempting to use the fab 40 attendance template. I don't need the time to show - Im able to hide that on the forms with jquery (endusersharepoint.com thank you!!) I WAS ATTEMPTING to create a calculated column called Start Date where the formula simply reads '=[Start Time]' When it's set to display 'Date Only' the date is off by a day. If I switch it to 'Date & Time' I get the correct date. Huh?

Set a Calculated column as hidden in a content type

Hello, I'm building a custom list with several columns, including a Calculated column. This calculated column simply takes the value of a choice column in the same list to convert this value to a single line of text value. I do this because when adding a lookup column to this list, I cannot select Choice columns as additional columns, but I can add the calculated column. Speaks for itself that this calculated column only needs to exist in the background, and end users should not see this column in the Add/Edit/Display forms. In add/edit forms the column is not displayed, but in the display form it gets displayed. Piece of cake I thought, I'll just set it as hidden in the content type used for the list. When I open the column the column settings (required/optional/hidden) is grayed out, so I cannot set it to hidden. In SP2007 this was possible, why can't I do this anymore in SP2010? Do I miss some feature in order to do this, or is there a good reason why this seems to have changed in SP2010?

changing font color on a data column field based on the contents

I am trying to change font color if the datafield has the string EMERGENCY. This is my original template field: <asp:TemplateField HeaderText="Type" SortExpression="DigType"> <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ></asp:Label> </ItemTemplate> </asp:TemplateField>   and this is what I thought would work: <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ForeColor='<%# IIf(Eval("DigType")="EMERGENCY","Black", "Red") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ForeColor='<%# IIf(Eval(&quo

Calculated column and hyperlink field type

Hi I have customer who is asking me if this is possible to provide filter based on the HyperLink field, where he could easly limit results to only those items where link field is filled. As filtering on hyperlink column type is not supported I was thinking to buld some calculated field based on it to return YES (if link is provided) or NO (if link is not provided). The problem is that hyperlink field type is not avialiable on the list of field to be used on calculated field. is there some workaround for that ? thanks for help   Mariusz Gorzoch Blog : http://mariusz.gorzoch.pl Twitter : http://twitter.com/MariuszGorzoch Facebook: http://www.facebook.com/mariusz.gorzoch

how can we split a datatable into two ,based on a column at runtime

hi , ihave a problem that to assaign values to two listviews from single datatable based on a column which have values 0, 1. it is wpf app the listview has a grid . i need to specify the result data as datacontext

Assigning a task based on 'person' column.

Hi All, I am creating an employee of the month type feature in Visual Studio. This involves a nominations list (where users can submit a nomination) and a custom task list (based on workflow tasks) In a nomination, a "Line Manager" is entered, and is set up as a Person Column. In code, I create a task, and I am trying to assign the task to the line manager. The code I have is: taskProperties.AssignedTo = workflowProperties.Item[ "Line Manager"].ToString(); This does return the name of the nominator (but with a prefix, usually #795; (or something like that)). How can I assign a task in code to a user based on the selection of a Person field (chosen using People Picker)?    Andrew Berry - Software analyst/Developer

Error when trying to add calculated column: ' Item has already been added. Key in dictionary:'

I created a subsite under a subsite in my MOSS 2007 site collection. Then I am trying to create a 'local' site content type for Quizzes. Next I am trying to create a calculated column and right after I specify Calculated Column as the type I get a mysterious error Now, Root Cause Analyst Name is a    Root Cause Analyst Name is a site column defined in the Root web, and referenced in the parent subsite, but it has nothing to do with my present effort. ? Can I not create content types in a sub-sub-site, or should I create them all in the root web? Here's the error:     Item has already been added. Key in dictionary: 'Root Cause Analyst Name_Root_x0020_Cause_x0020_Analyst_x0020_Name'  Key being added: 'Root Cause Analyst Name_Root_x0020_Cause_x0020_Analyst_x0020_Name'   at System.Collections.SortedList.Add(Object key, Object value)    at ASP._layouts_fldnew_aspx.__Render__control10(HtmlTextWriter __w, Control parameterContainer)    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)    at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)    at

Column Based Analytical Technology (CBAT) Alterion

Hi, Has anybody heard about Alterion ? I wanted to know if Data Mining in SSAS can replace the Alterion Analytical tool. After going through couple of articles I found that this technology is quite different than OLAP system. In OLAP we summarize the data and anlayse the performance of business in summary level. But Alterion is used for the analysis of detail level of data. I am totally new at Data Mining. Can Data Mining do the similar kind of Job of analysing detail level of data ? Most of the time, we have to perform analysis on Marketing data. For Example : There will be different sort of surveys done containing lot of questions. Now we want to analyse those type of data and not the summary level of data. Any suggestions can help us to replace Alterion to use SSAS tool. Thanks,
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