Author Archive

How to edit List forms in SharePoint 2010

Date:July 29th, 2010 Author: Tags: , ,
Category: General, SharePoint Ideas Comments:8 ;

In SharePoint 2007 there is a well known trick for opening up a list’s forms (New/View/Edit) in design mode – append ?ToolpaneView=2 onto the url – this is often used to add instructions or javascript using a Content Editor Web Part (CEWP) e.g.

However when I first tried to use my tried and tested shortcut in SharePoint 2010 I came a little unstuck as now the New/View/Edit forms appear in a fake popup window and modifying the URL doesn’t work.

There are two ways to do this in SharePoint 2010 – and once you know where to find them they should actually make life that little bit easier.

The first is to open up the form in a new window and then add ToolpaneView=2 onto the end of the URL, so

Right click on Add new Item or the lists Title field and select Open in New Tab or hold down CTRL while left clicking.

Alternatively you can do this using the new-fangled ribbon toolbar – select under List Tools the List tab, then on the right hand side of the ribbon you should see an icon for Form Web Parts which gives a menu of the different forms associated with the list that you can edit.


Showing the records ID on the View and Edit forms

Date:July 23rd, 2010 Author: Tags: , ,
Category: SharePoint Ideas Comments:37 ;

SharePoint - Modify View and show ID column

ID’s are a convenient, often short, way to uniquely refer to something. Unless you’re the Tax man who seems to believe he can’t get through his day without giving me, thats just one person, 7 unique id’s – presumably one for each extremity that he would like a piece off…

I digress… ID’s – SharePoint uses an ID for each item in a list and sometimes its handy to know them “Ere Bob – have you done task 1234 yet?”

You can easily add them to the list view (Modify this View then find the ID column, click display)

SharePoint - view with ID column

But what about if you want to see this on the View and Edit forms? (You can’t see it on the New form as it doesn’t get an ID assigned until you’ve created it)

You can’t do this in the UI. You can create a custom View/Edit form using SharePoint designer but its quite complex, is a pain when we add new fields and its fraught with potential problems.

So instead we’re going to look into every ones favourite SharePoint UI hacking tools – the Content Editor Web Part (CEWP) and javascript/jQuery.

(more…)

SharePoint Terminology – Farms, Web Front Ends, Web Application and Sites

Date:July 8th, 2010 Author: Tags: , ,
Category: General, SharePoint Development, SharePoint Ideas, Training Comments:9 ;

There is a great deal of confusion around some terms related to the different levels of SharePoint hierarchy. Some of this is buzword overload and some  has been brought about by inconsistent usage from Microsoft (and to be fair actually most of us in this industry).

So if you’ve ever wondered what things like Farm, WFE, NLB, Web Application, Site Collection and Top Level Site mean I am going to try and clarify the different terms without getting too technical as some of this stuff needs to be know by advanced, or power, users. I’ve missed out some of the more esoteric things like managed paths in the interests of readers sanity.

SharePoint Feature Receivers – the hidden details

Date:June 15th, 2010 Author: Tags: ,
Category: General, SharePoint Development Comments:2 ;

Warning –  this post is somewhat techie so if you’re not a developer you may want to go find something more interesting to do!

I’ve been doing some work with SharePoint Feature Receivers recently and found the official documentation to be somewhat … lacking.

SharePoint Feature Receivers allow you to run code when a Feature such as a web part or template is installed, activated, deactivated and removed. They are often used for installation/setup tasks that can’t be done using XML incantations in Manifest.xml, Elements.xml and Feature.xml.

I am not going to give a step-by-step guide to Feature Receivers (see the excellent How to add a Feature Receiver to a Feature from SharePoint dev wiki) but plan to detail information that I was struggling to find anywhere else.

(more…)

How To setup a SharePoint view filter to compare 2 list fields

Date:June 1st, 2010 Author: Tags: ,
Category: Filter, SharePoint Ideas Comments:2 ;

There are many instances where you might want to view a set of SharePoint list records which have been filtered on a comparison between values in 2 columns.  You might want to view a list of all sales reps who have failed to hit their targets: Actual SalesCredit Limit, or employees who have not used their full vacation entitlement: Vacation Entitlement>Days taken.

A customer recently contacted me with just this type of question :-

They use a SharePoint list to keep track of orders waiting to be manufactured and delivered – so amongst other fields they have Scheduled Delivery Date (which they have promised to a customer) and the Estimated Delivery Date which is kept up to date with the latest estimate. Most of the time the two agree but sometimes for various reasons the delivery date slips.

They have been using Reminder to send out automated emails for upcoming orders and ones that had just been missed but they wanted to setup a view that would show only orders where the Estimated delivery date was later than the date they had told the customer. Account managers could then use this list to keep customers up to date – “There is a delay on that order we have scheduled for you for next month, we estimate it will be ready on the 17th”

Sounded pretty simple to me and I confidently told them how they could do it (more…)

SharePoint Calculated columns – Adding hours onto a date field

Date:May 18th, 2010 Author: Tags: , , ,
Category: General, SharePoint Ideas Comments:10 ;

A customer recently contacted me with an interesting question.

They were using a SharePoint task list to help schedule jobs for field engineers but rather than have a Start Date and End Date field they wanted to have a Start Date and Duration field and automatically work out the End Date.

So End Date = Start Date + Duration

They were then planning to display this using Planner in the By Category view which is idea for resource booking as it makes it easy to see when a resource is booked or free (SharePoints built in gantt chart can’t do this swimlane style of view and doesn’t support using calculated columns).

Now this is easy to do if the Duration is specified in days – in fact you just use the equation above – but what if Duration is in hours or minutes?

First port of call is this page from Microsoft showing examples of common date time formula you can use in SharePoint calculated columns hmmm, adding days OK… adding months Check… adding years OK too….but nothing about hours. Back to the drawing board.

(more…)

How To Use Filters in SharePoint to show items in the current Calendar Month

Date:November 26th, 2009 Author: Tags: , , ,
Category: Calculated Columns, Filter, SharePoint Ideas Comments:209 ;

Its very easy using the Filter feature of SharePoint views to show only items completed in the last 30 days or items due in the next X days; for example :-

Completed >= [Today]-30

On the Advanced SharePoint View and Filter techniques post Ed asked how you could filter for the current calendar month rather than a rolling 30 day period (for example all tasks due this calendar month).

Like all great questions it seemed simple enough – something like only showing items where the Month and Year of the due date = the Month and Year of the current date.

(more…)

Tip – Sending an SharePoint email Alert when a Task is completed

Date:October 16th, 2009 Author: Tags: , , , ,
Category: Filter, SharePoint Alert, SharePoint Reminder, SharePoint webparts Comments:0 ;

Victor from New York asked

Is there a way to configure a Reminder webpart to send an email when task item status in the task list is set to “completed”?

Sure there is!

In this case the trick is to use a SharePoint Views to filter out the tasks you are interested in.

(more…)

Tip – don’t send SharePoint email alerts for old items.

Date:October 16th, 2009 Author: Tags: , , ,
Category: Filter, SharePoint Alert, SharePoint Reminder, SharePoint webparts Comments:0 ;

There are some scenarios where you could setup Reminder to generate emails alerts in a simple workflow scenario such as such as when a Task is completed,  a helpdesk ticket is closed, a company announcement is made, a vacation request or expenses claim is approved and so on.

When you first set up this kind of reminder, an email alert for any records already in this state (e.g. completed tasks) will also be sent and some of these could be quite old, so you could end up sending quite a lot of “old” reminder emails.

If you want to avoid sending emails for these old records you have 2 options:


  • Use the Redirect Emails function to redirect the emails to yourself the first time its ran, delete these and then remove the redirect

This also gives you the opportunity to double check that everything is setup correctly.

  • Use a view to filter out old records

For example you could filter to show only records with an ID > a recent ID.

Or you could add filter to show only records Created after a certain date.

Tip – All records in SharePoint have an ID and its sequential and automatically generated. To find the id you can show the ID column in your view or see the ID in the URL in your browser address bar.


SharePoint Reminder Webpart Free Trial Dowmload


Filterpoint Download

Tip – Showing multiple columns in SharePoint Planner Webpart

Date:October 14th, 2009 Author: Tags: , , , , , ,
Category: Calculated Columns, SharePoint Planner, SharePoint webparts Comments:1 ;

There may be times when you want to display timeline or category information from more than one list column in a gantt chart. For example in the chart below we have taken information from the “priority” and “title” columns of a list to populate the category labels.

With Planner you can show multiple columns in the Category or on the Timeline of a Gantt chart by using a calculated column to merge fields together.

concat-columns
For example to merge Priority and Title columns together you would :-


  • From your list click Settings > Create Column
  • Set a name such as “Category”
  • Choose Calculated for the type
  • In formula enter (where [Title] etc is the name of the columns you want to merge)
      =[Priority] & " : " & [Title]
  • Uncheck ‘Add to default view’ checkbox if you don’t want this appearing for the normal list view.
  • In Planner you can now select this column.

You can merge multiple columns together, for example :-

   =[Priority] & " : " & [Title] & " - " & [Assigned To]

You can also use SharePoint standard functions and formula (many similar to excel) such as :-

   =Text([Start Time],"mmm-yyyy") " : " & [Title]

Which would prefix the Title with Month and year, like so  October-2009 : Your title here

To display the the duration in days you could use

   =DATEDIF([Start Time],[End Time],"d") & " Days"

See some more examples of common functions