Monday, March 07, 2011

Passing URL Querystring to IntelliGantt Web Part

One of our design goals for the IntelliGantt Web Part was to make it easy for users AND for system integrators. For instance, we know how important a brand is so we reserve an area of the gantt chart to display a customizable name with a url link. Additional configuration options like colors, zooms, custom list IDs and more are available via the web part editor or passing parameters via the initParams string (our control being a good Silverlight citizen).

Then someone asked us 'can I pass configuration parameters with the url querystring?'

What a simple and powerful idea! Last Wednesday we said 'no', but today we can say YES!

We have created a table of all the parameters IntelliGantt recognizes. You can use these parameters via the initParams property if you've configured a 'Site Only' instance of the IntelliGantt Web Part, or you can pass these parameters to the SharePoint page housing the IntelliGantt Web Part via the url querystring and make things really dynamic.

The best example of this new capability is how you can now select a task list and view by placing information in the url querystring. Let's say I have a SharePoint site with two task lists: Tasks and Big Project. By default, the IntelliGantt Web Part finds all the task lists in your site and displays them:




Yes, we can either use the 'Exporer' to select just one project, or we can use the web part editor page to select a single project. But what if we could determine the list to show before-hand and construct a url with selected project and view information? Then we can actually plug the web part into a multi-step workflow process.

First, let's add a SelectListIDs value to the url so that just one project is selected. You can find a task list id value by first navigating to the task list:




and then going to the List Settings:




Once in the List Settings, notice that the url string in your web browser contains a querystring parameter of List=:




We can use this exact same list idea value in the querystring of the url of the IntelliGantt Web Part page. Rather than just 'List', we use 'SelectedListIDs' because we think it's clearer and we support multiple lists in the view. There, we create an url like so:




Finally, you can add multiple paramteters to the querystring just as you'd expect-- by concatenating them with the '&'. So, now that we've selected the right list, we can also select the view to use via the query string by appending the view name:




And voila, the task list and view for the IntelliGantt Web Part have been determined by the values in the querystring. What if the same parameter is defined in the web part editor? Then the web part editor value will take precedence. In order use the querystring parameter, make sure the corresponding field in the web part editor is blank.

As we add more configuration options to the IntelliGantt Web Part, we will make sure they can be set via the web part editor, the initParams or the querystring. This will ensure our design goal of making our web part as flexible for system integrators as possible.

Saturday, March 05, 2011

Selecting a Single Basecamp Project

Build 1.0.72 of the IntelliIGantt Web Part for Basecamp has a new feature we hope 'power users' will appreciate: the ability to identify a single Basecamp project in the url string.

I was online with a customer who wanted to view a specific project, but we had to wait for all projects to load before we could select a single project. This doesn't sound too bad, until you consider they had 100 projects. Kudos to 37 Signals for handling so many with aplomb. Now it was our turn to step up to the plate.

We took a look at the url used after clicking on a project from the initial dashboard. It looked something like this:



We thought 'we can use that'. So, if you copy the same url and place it into the IntelliGantt Web Part for Basecamp like so:




The IntelliGantt Web Part will then match that project and show that single project in its view.




You can still access any of the other projects by clicking on the Explorer (pith helmet). This will show you all projects with the current, single project selected for you:




Select any of the other projects and they will appear in your current view as well.