Search This Blog

Showing posts with label Lists. Show all posts
Showing posts with label Lists. Show all posts

Monday, June 1, 2009

Displaying and Filtering Lists in another SharePoint Site with SharePoint Designer 2007

By popular demand, I am dedicating this posting to the avid readers of the blog.

As mentioned in the title, we will be addressing how to display and filter ListItems contained in another SharePoint Site by using SharePoint Designer 2007.


This is a very easy way to maximize the use of a powerful tool such as SharePoint Designer 2007 is for SharePoint Technologies. Now, let's start customizing:

Connecting to another library

  • Open SharePoint Designer 2007
  • Click File -> Open Site
  • Enter the URL of the SharePoint Site that we will customize
  • Click the default.aspx Page
  • Scroll down to the bottom of the TreeView
  • Click the Connect to another library Link
  • Click the Add Button
  • Enter the Display Name for the Site
  • Enter the URL of the SharePoint Site
  • Click OK Button
  • Click OK Button

Adding and Displaying the SharePoint List with the Data View Web Part

  • Position the cursor where we desire the Data View Web Part to be displayed
  • Click Insert -> SharePoint Controls –> Data View on the SharePoint Designer Top Menu
  • Click the Data Source Library Tab located at the right corner of SharePoint Designer Toolbox
  • Expand the Node corresponding to the recently created connection to another SharePoint Site
  • Expand the Node named SharePoint Lists
  • Hover over the desired SharePoint List to display
  • Click the Show Data Link
  • Select the SharePoint List Columns to display
  • Drag and Drop them onto the Data View Web Part
  • Click the Save Button on the SharePoint Designer 2007 Top Menu Toolbar
  • A Message Box indicating that the current SharePoint Site will be customized is displayed
  • Accept and Continue
  • Refresh the Browser
  • The SharePoint List is now displayed

Filtering the SharePoint List with the Data View Web Part

  • Click the Data View Web Part
  • Click the > Button
  • Click the Filter Link
  • A Filter Criteria Box is displayed
  • Click the Click here to add a new clause Link
  • Select from the Dropdown the Field Name to be used for filtering
  • Select the desired value in the Comparison Dropdown
  • Select the filtering value in the Value Dropdown
  • Click OK Button

While this approach easily accomplishes the tasks of displaying and filtering a SharePoint List from another SharePoint Site, it can become an inconvenience for a SharePoint Administrator in a scenario in which multiple sites will require a specific filter for the SharePoint List.

Enjoy!

Displaying Concatenated Columns in a Calendar View

Displaying Concatenated Columns in a Calendar View

Sometimes, the need to display columns that contain values from other

existing columns in a SharePoint List arises. For those times, a quick and easy

solution is to create a calculated column that will contain the columns we desire

to display.


A real world example for using a Calculated Column that comes to mind is in a

Calendar View ListItem: Merging the Title Column with the Date and Time of the ListItem.

This can easily be accomplished by creating a calculated column that concatenates the

values in those columns.


For this example, we will assume you already created a standard Calendar List. Under the

Calendar List Settings of your List:

  • Click Create column
  • Set the Column name: to: TitleAndDate
  • Select the Calculated (calculated based on other columns) Radio Button
  • In the Formula: Text Box type:

=Title & " " & TEXT([Start Time],"mmm-dd-yyyy")

  • Select the Single line of text Radio Button for The data type to be returned from this formula is:
  • Click OK Button

In order to displaying the newly created TitleAndDate Column in the Calendar View, we

must modify the Calendar Columns View and set:

  • Month View Title
  • Week View Title
  • Day View Title

DropDowns to: TitleAndDate

  • Click OK Button

The end result will display the Title and the Start Date separated by a space.


Reviewing the Formula

The magic occurs in the TEXT function that converts the Start Time Column into text,

followed by the text being formatted into "mmm-dd-yyyy".


In case you need to add the time, just replace "mmm-dd-yyyy" with "mmm-dd-yyyy HH:MM:SS".