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.

You cannot specify the logon username for a Data View Web Part filter in FrontPage 2003


View products that this article applies to.

Symptoms

When you add a Data View Web Part to a Microsoft Windows SharePoint Services list, and then you create a filter for that Data View that compares the Created by field with the logon username in the form of "domain\username", it returns no values for that filter criteria even if the current user matches this criteria.

↑ Back to the top


Cause

This problem occurs because the Created by field compares the "friendly" name version of the username and not the logon username.

↑ Back to the top


Workaround

To work around this problem, you can force the filter to use the logon username. To do so, follow these steps:
  1. On the Data menu, click Filter.
  2. Click Click here to add a new clause.
  3. Click Created by in the Field Name column.
  4. Click Equals in the Comparison column.
  5. Click [Current User] in the Value column.
  6. Click OK.
  7. In the lower right corner of the edit window, click Code.
  8. On the Edit menu, click Find.
  9. Type Name="UserID" Location="CAMLVariable" in the Find What box, and then click Find Next.
  10. This will find the following line of HTML code:
     <ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
  11. Change the line of HTML code to the following:
     <ParameterBinding Name="UserID" Location="ServerVariable(LOGON_USER)" DefaultValue="[ LOGON_USER ]"/>
  12. Save the page, and then click Preview at the bottom of the edit window.
Note These steps assume that you already have created a Data View in an Announcement list. To create a Data View, follow these steps:
  1. Click the page where you want your Data View to reside.
  2. On the Data menu, click Insert Data View.
  3. Click the Windows SharePoint Services list that you want to use as your data source.
  4. Click Insert Data View.

↑ Back to the top


More information

For more information about how to use server variables, visit the following MSDN Web site:

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.

↑ Back to the top


Keywords: KB831091, kbprb, kbfilters, kbhtml, kbwebpublishing

↑ Back to the top

Article Info
Article ID : 831091
Revision : 6
Created on : 10/16/2007
Published on : 10/16/2007
Exists online : False
Views : 294