Archive for the ‘SharePoint Ideas’ Category

Setting a default duration for new SharePoint Calender Events

Date:September 30th, 2009 Author: Tags: , , ,
Category: General, SharePoint Ideas Comments:17 ;

Tristan asked in another post

“When a calendar event is being created, I want the end date/time to automatically populate to 1.5 hours after the start date/time.  Seems simple, but haven’t found a formula for this yet”

new-event-thumb

Sounds like a pretty reasonable suggestion and the Calendar lists NewForm.asx already sets the Start time to the current time – shouldn’t be too hard, right?…

(more…)

The … ehem… Truth about using [Today] in SharePoint Filters

Date:November 25th, 2008 Author: Tags: , ,
Category: Calculated Columns, Filter, SharePoint Ideas Comments:12 ;

Back in the day of Windows SharePoint Server 2 and SharePoint Server 2003 you couldn’t use [Today] in Filters.

For example if you tried to setup a filter like this to show items added in the last 7 days


"Filter value is not in a supported date format"

Created is greater than [Today] - 7

Created is greater than [Today] – 7

You would receive an error “Filter Value is not a valid date” when clicking OK

(more…)

The Truth about using [Today] in SharePoint Calculated Columns

Date:November 22nd, 2008 Author: Tags: , ,
Category: Calculated Columns, SharePoint Ideas Comments:32 ;

If you try to create a calculated column with a formula containing [Today] or [Me] SharePoint gives the error :

“Calculated columns cannot contain volatile functions like Today and Me”

There are a few reasons you might want to do this. One would be to display how many days left you have to complete something, the other is to only show things added in the last X days or due in the next X days.

There are many pages mentioning this workaround :-

1) Create a dummy column called “Today”, then add your calculated column using [Today] in the formula, finally delete the dummy column. If you need to edit the formula then you have to go back to the start and add the dummy column again.

2) Optionally you can create a calculated column called “My Today” and set its formula to =[Today] using the trick above. Reference [My Today] in your other calculated columns. Thus you reference [My Today] which in turn references [Today]. Then you will not have to add the dummy column back in every time you want to edit formulae.

You then pat your self on the back and head home after another successful day of harassing SharePoint to do what you want, Hurrah!

But the next day you take a look at your list and its wrong. The formula has not updated and its still showing yesterdays value. DOH! SharePoint has made a fool of you after all.

Turns around there is actually a good reason for SharePoint not allowing volatile functions like [Today] or [Me] in calculated columns.

“Calculated fields don’t update themselves until item itself is updated.”

Read that again.

The value of a calculated column is only updated when item is edited and in the mean time you will see incorrect calculations every time you look. In fact, for most uses, this trick don’t give you anything more than just referencing the [Modifed] column.

One workaround to the workaround problem is to write a console app to find all these lists that use the [Today] trick and update them automatically once per day. But this workaround to the workaround problem may not be without its own problems that need to be worked around….

Depending on your need there may be a simpler way – turn the problem on its head!

In the example of using a calculated column to filter out items due in x days or overdue SharePoint will accept [Today] as part of the Filter but will not as part of a calculated column – so give it what it wants

[EDIT- WSS 3 / MOSS 2007 now accepts this]

  • Use a filter of [Created] is greater than [Today]-7

(Note – its essential to have no spaces; [Today] – 7 will not work but [Today]-7 does.

WSS 2 / SPS 2003

  • Create a column called “Filter 7 Days” and formula as =Created+7
  • Then use a filter of “Filter 7 Days” is less than [Today]

See this page for more details – http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/

So the calculated column is not dynamic (it will never need updating unless the record itself changes) and SharePoint is happy – but the filter is dynamic and you are happy!

If you want a countdown in your view (i.e. Days left to complete a task) then take a look at this post – http://pathtosharepoint.wordpress.com/2008/08/25/a-countdown-for-tasks-lists/

Shameless plugs

– check out our Highlighter product if you want count-down to Today (e.g. 5 days left, 10 days overdue)

– or check out Reminder if you want “Alert Me” type emails when a task is due soon or overdue.

[EDIT] As it’s been pointed out to me the tone of this article was off from what I intended – the intention is to make clear that this well known and oft mentioned trick does not work as you might expect and to offer alternatives.

Free SharePoint Calculated Column Cheat Sheet
a handy 3 page reference for calculated column functions and formulas.

Working Days, Weekdays and Holidays in SharePoint Calculated Columns

Date:November 21st, 2008 Author: Tags: , , ,
Category: Calculated Columns, SharePoint Ideas, SharePoint Reminder, SharePoint webparts Comments:35 ;

AcmeCorp aim to reply to customer complaints within 3 working days. They plan to use SharePoint Reminder webpart to alert managers when these targets are not being met.

We have a list with the following information

ID Title Date Received Reply Due Reply Sent
1 Order hasn’t arrived Friday 7/Nov/08 Wed 12/Nov/08
2 Order missing items Monday 10/Nov/08 Thursday 11/Nov/08

Once we have this table we could make a View with a filter to only show records that don’t yet have a Reply Sent date (i.e. they have not been dealt with) and then configure a Reminder web part to watch this view and send out emails when the Reply Due date is overdue.

(more…)

Advanced SharePoint View and Filter techniques

Date:October 26th, 2008 Author: Tags: , , ,
Category: Filter, SharePoint Ideas Comments:119 ;

Introduction

We discussed in a previous article how to customise SharePoint’s built in Task List and briefly looked at the power of Views with Filters. In this article we will build upon that by demonstrating some advanced use of Filters.

This article assumes that you are already familiar with Views and Filters – if not please review the previous article.

(more…)

Extend and customise SharePoint Task lists

Date:October 26th, 2008 Author: Category: Filter, SharePoint Alert, SharePoint Ideas Comments:13 ;

Introduction

One great feature of SharePoint is the ability to extend and customise the built in List types (such as Announcements, Contacts, Issues and Tasks) to meet your requirements. In this series of articles we will give you some ideas on how you can modify a task list to meet the needs of business processes you have in your organisation.

(more…)

Don’t get Public Key Blobs and Tokens mixed up!

Date:October 26th, 2008 Author: Tags:
Category: SharePoint Development, SharePoint Ideas Comments:0 ;

Introduction

When developing web-parts for Microsoft SharePoint, a developer must confront the .NET runtimes Code Access Security and Strongly Named Assembly features.

There are several gotchas involved, one of which – mixing up public key tokens and blobs – is described here.

(more…)