31 October, 2006

Create a custom list form for a SharePoint list

SharePoint has always been good for basic business forms. A custom SharePoint list can be configured to collect any type of data and SharePoint automatically generates the forms for adding new items, editing items and viewing items. In SharePoint 2007, the workflow capabilities make SharePoint lists an even more attractive foundation for basic business forms.

In order to manage the data you collect from the form submitters, you will often have a few extra columns (e.g. status, notes, etc.) that you don't want the user to fill in when submitting the form. Using SharePoint Designer you can create a customised version of the form for adding new items that does not have your extra management columns on it.

  1. Open your site in SharePoint Designer.
  2. Browse to your list and open the 'NewForm.aspx' web form.
  3. Go File > Save As... and give the form a new name such as 'NewForm2.aspx'.
  4. Delete the default List Form Web Part from the page.
  5. Go Insert > SharePoint Controls > Custom List Form.
  6. In the List or Document Library Form dialog, select the appropriate list, content type and type of form.
  7. Click OK and a new Data Form Web Part is added with controls representing all the fields from the list (in my environment all the controls show "Error Rendering Control" but this does not affect the final result).
  8. In the newly added Data Form Web Part, delete the rows containing fields not to be shown to the user (ensure that fields being removed are not required fields without default values as this would prevent the user from submitting the form).
  9. At this point, you can do other customisation such as rearranging the fields if you wish.
  10. Save the site.

To give users access to your new form, publish a link to the NewForm2.aspx page. By using the Source query string parameter you can direct users back to where they came from after submitting the form. For example, if you publish the link on 'http://portal.example.com' then the URL to the form would be 'http://portal.example.com/Lists/YourList/NewForm2.aspx?Source=http://portal.example.com'.

Stay tuned to my SharePoint musings: Subscribe via email or RSS.

14 October, 2006

Data tracking with SharePoint 2007 and Access 2007

Microsoft Office Access used to be quite a popular application for tracking almost any type of data as it was relatively easy to create a few tables, design some basic forms and off you went with a tool for tracking issues, tasks, requests, etc. However, it was always a problem to decide where to store the .mdf file so it could be shared and backed up properly.

There is a much improved solution for this in Office 2007. For any application based around data tracking and where offline support is a requirement, SharePoint 2007 and Access 2007 plays together very well. Access can be bound to SharePoint lists. This gives you the server-based benefits of SharePoint and provides you with a rich UI and offline support.

To start exploring this functionality try the following:
  1. Create an Issues Tracking list in SharePoint.
  2. Add some sample data to it.
  3. From the Actions menu, select Open with Microsoft Office Access.
  4. An Open in Microsoft Office Access dialog pops up. Make sure Link to data on the SharePoint site is selected and click OK.
A new Access database will be created complete with a number of reports, views and forms to add and edit issues. The data is stored only in the SharePoint list on the server and whenever you hit Save, changes you make in Access are saved back to the server. When you hit the Refresh button on the Home ribbon, changes made on the server are updated in Access.

The data is still linked to the SharePoint list. To take the data offline click Take All Offline on the External Data ribbon. You now have a local copy of the issues list including a rich interface to interact with it. The data is saved locally only.

At any point in time, you can hit the Synchronize button on the External Data ribbon which will synchronise the data with the SharePoint list on the server. If there are any conflicts, a Resolve Conflicts dialog will allow you to resolve them.

All in all, SharePoint and Access together provide a powerful and simple solution for data tracking. SharePoint enables proper sharing and backup of the data and Access provides a rich UI and offline support.

12 October, 2006

Enabling PDF search in MOSS 2007

Instructions on how to install the Adobe iFilter, configure MOSS 2007 to index PDF documents and map an icon to the .pdf file extension have been posted here. Thanks to Steve Walsh for originally posting these instructions on the newsgroups.

Update: The above link is broken. Try this post instead.

Update: For Adobe PDF iFilter 9 on 64-bit platforms, follow the guidelines provided by Adobe.

Stay tuned to my SharePoint musings: Subscribe via email or RSS.