.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

Calendar View using Calculated Columns

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

I've got a large list of documents that undergo regular maintenance.  To help facilitate this, we had an Excel spreadsheet (recently converted into a Custom List in SharePoint) containing columns with "Date Last Revised"(Date), "Effective Period"(number), "Delay"(number), and "Next Revision Start Date"(calculated; Date Last Revised + Effective Period + Delay).

This works fine, until you get into SharePoint.  My columns are:
   Date Last Revised - Date and Time (Date Only) format
   Effective Period - Number format, Default Value = 365 (1 year)
   Delay - Number format, Default Value = 0
   Next Revision Start Date - Calculated (based on other columns) format; sum of other three columns

The Calculated column works fine, and will calculate a Date based on the values of the other columns.  HOWEVER, my ultimate goal would be to have a Calendar View of this information, where the Start/End dates are the "Next Revision Start Date" column.

When I try to use any other Date column, it works.  When I try to use the calculated "date" column, it gives me a generic error message:
An unexpected error has occurred.

I don't really want to lose the functionality of each item being able to have separate effective period and delay values, but any informatio

View Complete Post

More Related Resource Links

Change Columns to be represented in calendar View




I have created a global calendar that takes events from my subsite calendar. It works great, the only problem is that I cannot change the default Title column in Month View Title, don't know what code to use. I know I should create a content Type to hold my custom column, so I'm using the same columns in all my subsites, I want to change Title as the column in "Month View Title", "Week View Title", "Week View Sub Heading", "Day View Title" and "Day View Sub Heading". I will continue my search but if anyone knows I'll be glad to get some help. Thanks.

Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

How to create scrolling table for columns in a SharePoint Designer Data View


I have a fairly complex SharePoint Designer 2007 Data View they have added two more requirements.

1. Have the columns on the right side be able to scroll left to right as there is a large number of columns, while the first 3 columns on the left side stay locked in place.  This is only one list not two, and because of some other requirements I have it must remain to be just one list.

2. Then they also need to have scrolling up and down of the entire list with the headers locked in place.

The first requirement is more important than the second, but preferrably I need to do both.

I am new to XSL so not familar with the syntax. Is this something I can do on a custom Data View? Does anyone have any examples of how?

I have a drawing that show how it needs to look but I don't see an option here to upload a graphic.

So here is a link to my graphic example uploaded to my blog area: http://lindachapman.blogspot.com/  or just the image here: http://4.bp.blogspot.com/_aB01ue__NvQ/TGL42MOvrGI/AAAAAAAAAA4/c3xP4uCy4BU/s1600/Scrolling.png

I failed to mention that 3/4 of the columns are HTML Calculated fields wh

Calculated Columns in a Form Library receive error: Value does not fall within the expected range.


I have a forms library that posts the date the form was created. We would like to create a calculated column that allows us to look at these forms based on the month and year they were created. I had created a calculated column that extracts the month and replaces the number with a text string by using an if statement; "IF(MONTH([Proposal Date])=1,"January","") It goes on to evaluate each month and replace the number with the text string. This formula worked for quite some time, though now when I try to add any calculated columns or edit any existing calculated columns on this form library I receive the following error: Value does not fall within the expected range. Now my existing calculated columns (like the one above) do not work and I can not create new calcualted columns. Any insight would be awesome as this has been plaguing me for a couple of months now.

Applying custom CSS to the MOSS 2007 Calendar control Month view



I have a requirement to use the MOSS 2007 Calendar Control - month view is to apply a custom css to have a look and feel as per our requirements.

We tried applying the custom css to the MOSS 2007 calendar control - month view, it does take the custom css and applies it, but when i click on any date and come back to the calendar control, it changes the CSS of the MOSS calendar control back to the default one.

Let me know if anyone has any suggestion on  how to customize the calendar control for css for our intranet application.

Your response would be highly appreciated.






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?




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.

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.

Customize calendar to view next month

I was wondering if there is a way to change the calendar view on SharePoint so that it defaults to next month.  Will I have to create a custom web part for this functionality or can I create a view and manipulate it with filters? Thank you in advance.

Displaying Calendar Description Field In Calendar View

In the default "out of the box" calendar view it only shows the Title of a calendar event. Is there any way to show not only the Title field but also the Description field?

Calendar and grouped view causes errors

Hello, I've come across a bizarre situation on a standard web part page. First I add a simple (or so I thought) document library web part with a view grouped on a column. The view is collapsed. Then, I add a calendar view to a page. Immediately, my grouped doc lib view turns into a site navigation web part with no resemblance to the doc lib. If I change the doc lib view to a non-grouped view, all is well again. I've built three different pages on different sites and can re-create this problem every time. If I change the Calendar web part to a detail rather than a calendar view, the page goes back to normal. Any idea what is going on here or how I can mix a calendar and a grouped view on the same page?   Thanks.

Remove time from Month Calendar view

We have a calendar part on a page that has very narrow boxes for each day. As such we want to remove the time from appearing before the title of the event. I have managed to do this through css where there is only one event. However, have not been able to remove it where there are mutiple events. Any ideas on how this can be removed in both scenarios? Cheers, Theo

How to sum Calculated Columns

Hi, I want to sum the calculated column (currency format). I found some ways to do that in SharePoint 2007 but how to achieve this in SharePoint 2010? I  try to use SPD 2010 but no result. Thanks in advance!   

Can Managed Metadata columns be edited in the DataSheet View of a Library or List?

Hi, I like to mass set document properties in a library using DataSheet View, the properties are columns based on Managed MetaData values. When I open the doc library in Datasheet view, those columns become read-only. I made sure the library does not require 'Check Out' and also tested it in other views then the AllItems view. Can someone confirm what is the expected functionality and or if there is a bug?

Sharepoint Calendar export to Outlook but can only view the Title column

I have created a Calendar in Sharepoint for booking out company vehicles. The fields I have created are: Vehicle (Choice), Driver (User/Group), Start & End Times, Title (text), DisplayField (Calculated text based on Vehicle + Title...... it would be nice to include Driver but it seems Sharepoint cannot handle the User/Group datatype in a calculated field.....but I digress). I use the DisplayField calculated field in my default calendar view in Sharepoint. All is good at this point. When one connects it to Outlook (via the Action menu in Sharepoint) the calendar is added but all the entries show only the Title field. If I double click on an entry, only the title field appears - the Vehicle and Driver values are missing. When I try to create a new entry - only the Title field (plus other default Outlook fields) are available. So: How can one display a value other than Title by default, and how can I display the other columns when looking at the event detail?

Problems with a calendar and a grouped view

Hi, I am having a problem mixing a SharePoint 2010 Calendar view with a Document library view that is grouped and collapsed. Whenever I add the calendar view to a page (calender details work fine just not the graphical calendar), I lose all the detail in my grouped documents view. I see either an empty icon with an "X" on it or just the name of the grouped column. I need to have these elements together on a team site home page for a major project. If you have not tried this, could someone see if they can replicate the behavior? I've tried it on my dev and QA systems and it happens the same on both and in different site collections as well. Thanks.

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