.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

Edit in Datasheet allows overwritting calculated field formula.

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


I discovered some unexpected behavoir while editing an item in a list while in Datasheet view.  I was able to overwrite a calculated field's value with a value I typed in.  I was shocked that I was able to even mouse into that caculated field's column.  When I changed the value for that field and tabbed off it, a message box appeared prompting me to preview the change and that the operation whould be timeconsuming.  I clicked "ok' to continue and discovered that each column in the table had changed to the value I entered for each row in existence.  If I go back into the list settings to see the formula for the calculated field, I notice that the formula has changed to equal the value I typed in Datasheet view.  This can't be good.


Here are some steps to reproduce.


1. create a list or document library

2. add/create a new column, select calculated field with some numberic formula eg = 3*4, be sure to select number as the return data type.

3. add a few new entries to the list or library.

4. select edit in datasheet.

5. attempt to edit the value of the calculated field with some numberic value.

6. you may be prompted for a username/password if the signed in

View Complete Post

More Related Resource Links

Workaround to using "Person or Group" field in a "Calculated" column formula?


Apparently, SharePoint does not allow you to insert a "Person or Group" column into a "Calculated" field's formula.

Is there a workaround to adding a "Person or Group" column into a "Calculated" field's formula?

-Maybe a way of coverting the data from the Person or Group column into a text field, and referencing that text field in the formula?

Microsoft mentions only Columns of the following data types can be referenced in a formula: single line of text, number, currency, date and time, choice, yes/no, and calculated.

Calculated date field displays differently in List View and Data View web parts

In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.

Cannot edit datasheet in WSS 3.0. Getting Unresolved errors.

I have two users who cannot edit in a datasheet view in SharePoint 3.0. I have tried reinstalling Office and IE. To no avail, this is becoming a big problem. All my other 40 users can edit just fine. I do not want to resort to reimaging the machines. I would rather fix the problem and document. Logged into the users machine, they cannot edit and when I login, I cannot edit. But if they log into my machine, they can edit. Any help would be appreciated.

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.

Showing highlighted text (HTML) in calculated field?

Greetings all,   We're porting our 2007 list to 2010. In Sharepoint 2007, we used the following Calculated Column code to display a highlight over items that had different statuses:   =IF(Date="","<DIV style='background-color:#ff6666'>Not <b>Yet</b> Set</DIV>", IF(Finalized=TRUE,"<DIV style='background-color:#66ff66'>Finalized</DIV>", "<DIV style='background-color:#fffa91'>Tentative</DIV>"))   When we use this in Sharepoint 2010, it doesn't seem to apply the DIV structure. Any ideas of how we can change our code to make this work? Thanks! --Dave   No matter -- I need to add a code snipped ( http://marijnsomers.blogspot.com/2010/01/write-html-code-in-sharepoint-via.html ) to the page... thanks!

Formula on Main Report Using a Field from Subreport

Hi, I try to use a value coming from a cell which contain a subreport. I need to create a formula using this value. So I tried : =Code.CalcPct(CountDistinct(Fields!s_contactsvisited.Value), Globals!CALL_SubReport) But I've an error: [rsRuntimeErrorInExpression] The Value expression for the textbox textbox9 contains an error: Specified argument was out of the range of valid values. Thanks for you help,      

Calculated Value based on a Checkbox field

Hi All:         This should be quite straightforward, but for some reason...         I implement a calculated value with this expression: =IF(fieldName="Yes",1,0) and the data type returned from this formula is a number with 0 decimal places...         Something particular about this, is that the fieldName field is a checkbox.         It doesn't work, I only get 0s for all the values (Yes or No).         I tryed again changing to =IF(fieldName="Yes","1","0") and data type returned string, but I get the same result...         Can you realize what I am doing wrong?... It's just that I see it pretty well...         Ok, thanks.Acaspita

Why can I not group by calculated field in Date format?

After migrating to SP2010 Foundation, I've discovered that for some reason I can't group a list by a calculated date field. Ex: Create a list with a date column A. Create another column B with a simple calculated date of [A]+1 and use the field format type 'date' Modify view to group the list by column B.  You're list will load, but when you attempt to expand one of the groups you'll be greated with an exception error. Why?? Am I doing something wrong? Note: You can group fine if the data type for column B is anything except 'date' format, but I really need to group items by a calulated date. Ultimately, what I'm trying to do is group my list items by week by calculating the end of the week using a simple formula =[Must ship by]+7-WEEKDAY([Must ship by])  then I want to gropu by the [Must Ship by] column like I always did in SP 2007, but now it errors out.  I also wanted to create my own timesheet template since the Fab 40 templates aren't available for 2010, but I can't really do that effectively without being able to group timesheet entries by week.  

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

infopath 2007 Expected value type: end-of-string ! calculated field

Hello I am using infopath since there is no field with type date and time in InfoPath 2007. I created three fields one for date one, for hours, and one for minutes then I created forth field that concatenate the values of the three fields this field will be used as column in form template library used by my form. All seems good so far but when I tried to concatenate those fields go the following error Expected value type: end-of-string how can I solve this ? my xpath looks like ../my:calmomoDate../my:cbmomoHours:../my:cbmomoMunites Thanks  Momo

formula field

hi...i want to work on different formulas and apply to the crystal reports..and i also want to to work on sqlexpression option.. these two fields are in field explorer..can anbody give me some site or web address so that icould work on them..

Unable to edit in datasheet - WSS 3.0

When I try to edit a list in datasheet view I receive the following error: The list cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Windows SharePoint Services is not installed, your browser does not support ActiveX controls, or support for ActiveX controls is disabled. This worked as of 2 or 3 weeks ago ( I do not remember the last time I tried it), and I cannot think of anything that has really changed locally or on the server. Other users have no issues. I have office 2003 with the SP parts installed. It is in my trusted site list and security is set to custom off a low template. All activeX controls are set to "allow" for the zone. I am also running IE 7 and SharePoint designer 2007, but both of these have been while it was working. Could a Windows or Office update have caused the problem? Any ideas?

Edit in Datasheet view does not work on one SharePoint 2007 farm, works on another.

The ability to edit in datasheet view on one of our environments no longer works.  I've tried different client machines on different builds and regardless of the install every library, list, etc. when attempting to edit in datasheet view shows as read only.  Our other environments those systems work as intended with those same clients. I've searched all over and haven't found anything that helped.  Any ideas?

Edit in Datasheet View on List is not working

I have a list with simple column types like single line of text, Number, Hyperlink,  Picture, choice. When i edit the list in datasheet-view, below error is getting displayed. An unexpected error has occured. Changes to your data cannot be saved. For this error, you can retry or discard your changes. This error is occuring on edit certain rows/columns only. The view is having a simple filter condition. Could anyone check and suggest a solution/workaround for this ? Thanks in advance.      

OOTB Approval Workflow SharePoint 2010 - Blank "Requested By" field appears in Task Item edit/view f



I am having a simple OOTB  approval worflow associated to the simple document library. Task is created when an document is uploaded to the library.  When I click the task item in task list, I see a blank field "Requested By"  right below the "Status" column and I am unable to understand from where this field is coming and how to populate this field. Any help would be great...

Calculated field for weekday not correct


We use a calendar on Sharpeoint to track events. These events can be all day events that may start at 12:00 am on Thursday and go until 11:59 pm on Friday. I put in a calculated field based on start time so it displays the day of week the event starts along with start time of the event in a list.
This is the calculation I'm using =TEXT(WEEKDAY(([Start Time])),"ddd") It works great if the start time is after 12:01 am. If it is 12:00 am, it displays the day prior. For example Start time of 9/17/10 at 12:00 am will display the day as Thursday.

Anyone know how to correct this?


Filtered Calculated Field


Hi all,

I'm new working with SSRS. I have a doubt, it is possible to create a Filtered Calculated Field. For example: I have a dimension Product (contains: Car, Computer, TV...) and a measure Revenues. But i want to create a measure Car Revenues and other measure Computer Revenues. And Car Revenues represents only the Revenus from Car and Computer Revenues Represent only the Revenues from computer.

Is this possible?

Thanks in advance.

Jorge OS

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