Microsoft KB Archive/831091

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

Article ID: 831091

Article Last Modified on 10/16/2007

-

APPLIES TO


 * Microsoft Office FrontPage 2003
 * Microsoft Windows SharePoint Services

-





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 &quot; \ &quot;, it returns no values for that filter criteria even if the current user matches this criteria.



CAUSE
This problem occurs because the Created by field compares the &quot;friendly&quot; name version of the username and not the logon username.



WORKAROUND
To work around this problem, you can force the filter to use the logon username. To do so, follow these steps:  On the Data menu, click Filter. Click Click here to add a new clause. Click Created by in the Field Name column. Click Equals in the Comparison column. Click [Current User] in the Value column. Click OK.</li> In the lower right corner of the edit window, click Code.</li> On the Edit menu, click Find.</li> Type Name=&quot;UserID&quot; Location=&quot;CAMLVariable&quot; in the Find What box, and then click Find Next.</li>  This will find the following line of HTML code: <ParameterBinding Name=&quot;UserID&quot; Location=&quot;CAMLVariable&quot; DefaultValue=&quot;CurrentUserName&quot;/> </li>  Change the line of HTML code to the following: <ParameterBinding Name=&quot;UserID&quot; Location=&quot;ServerVariable(LOGON_USER)&quot; DefaultValue=&quot;[ LOGON_USER ]&quot;/> </li> Save the page, and then click Preview at the bottom of the edit window.</li></ol>

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.

<div class="moreinformation_section">

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

http://msdn2.microsoft.com/en-us/library/ms524602.aspx

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section of this article.

Additional query words: FP2003 FP11 WSS SPS SQL

Keywords: kbprb kbhtml kbfilters kbwebpublishing KB831091

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.