Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to use a lookup field as part of a URL to display data from a shared location by using FrontPage 2003


View products that this article applies to.

Summary

This article describes how to use Microsoft Office FrontPage 2003 to create a lookup field as part of a URL to display data from a shared location with a Data View Web Part.

↑ Back to the top


Introduction

When you create the lookup field as part of a URL, the data does not have to be saved in multiple locations. This can enhance team page personalization when you share information such as pictures, documents, or forms that would otherwise be saved in different locations.

↑ Back to the top


More information

To use a lookup field as part of the URL to display images from a shared location, follow these steps.

Note These steps show you how to add the URL for a picture library. You can also use similar steps to add a URL for a document library or for a form library.
1.Upload pictures to the picture library. To do this, follow these steps:
a. Start Microsoft Internet Explorer, and then open your Microsoft Windows SharePoint Services Web site.
b. Click Picture Libraries, and then click the picture library that you want.
c. Click Add Picture, click Browse, and then locate a folder that contains an image file such as the following folder:
Drive:\WinDir%\Web\Wallpaper
d. Click an image file, such as Azul.jpg, click Open, and then click Save and Close.
e. Click the image that you loaded to the picture library in step 1.d, click Edit Properties, and then type a title that matches the file name for the image.

For example, click Azul.jpg, click Edit Properties, and then type Azul. Note that you do not use the file name extension, .jpg when you type the title.
f. Click Save and Close.
g. Repeat steps 1.c through 1.f to upload as many files as you want to the picture library.
2.Create a custom list that contains a lookup field that accesses the picture library. To do this, follow these steps:
a. Create a new announcements list.

To do this, click Home to return to the Windows SharePoint Services Web site home page, click Lists, and then click Create List.
b. Click Announcements, type the name that you want, and then click Create.
c. Click Modify settings and columns, and then click Add a new column under the Columns section.
d. Type a name for the column, such as MyImage, click Lookup in the Get information from list click the picture library that you selected in step 1.b, and then click Title in the In this column list.
e. Click OK
3.Add an announcement that contains the lookup field to an image file in your picture library. To do this, follow these steps:
a. Click Home to return to the Windows SharePoint Services Web site.
b. Click Lists, click the Announcements list that you created earlier, and then click New Item.
c. Type the announcement title that you want, click the column list, such as MyImage, and then click the title name of the image file that you added to the picture library in Step 1.e, such as Azul.
d. Click OK, and then click Save and Close.
4.Create the Data View Web Part. To do this, follow these steps:
a. Start FrontPage 2003, and then load the Windows SharePoint Services Web site.
b. On the File menu, click New, and then click Blank page in the right pane.
c. On the Data menu, click Insert Data View.
d. Click the Announcements list that you created earlier, and then click Show Data.
e. On the Work with data pane, click the Title field, press and hold down the CONTROL key, and then click the MyImage column.
f. Click Insert data view.
g. On the blank Web page, right-click the column data value that you created earlier, such as MyImage, point to Format Items as, and then click Picture.
h. On the blank Web page, click the red X, and then click Quick Tag Editor on the Edit menu.

The img tag appears.

Note The src attribute is similar to �{@MyImage}�.
i. Change the src attribute to point to your image.

For example, the src attribute in the img tag must look similar to the following:
<img border=�0� src=�http://ServerName/PictureLibraryName/_t/{@MyImage}_jpg.jpg�>
Note This path will point to the image thumbnail.
j. Click the green check mark to close the Quick Tag Editor.
k. On the File menu, click Save.
Start Microsoft Internet Explorer to view the new Web page.

↑ Back to the top


Keywords: KB873010, kbinfo, kbhowto

↑ Back to the top

Article Info
Article ID : 873010
Revision : 2
Created on : 11/23/2004
Published on : 11/23/2004
Exists online : False
Views : 387