Re: [Current User] filter problem
From: John Jansen \(MSFT\) (johnjan_at_online.microsoft.com)
Date: 02/03/04
- Next message: Mike: "WebPart Monitoring"
- Previous message: Robert Kellogg: "Upgrading Default Web Site"
- In reply to: Stefan Nilsson: "[Current User] filter problem"
- Next in thread: Stefan Nilsson: "Re: [Current User] filter problem"
- Reply: Stefan Nilsson: "Re: [Current User] filter problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 3 Feb 2004 11:08:39 -0800
By setting up the filter the way you did, you are actually filtering on the
Friendly name...
What you want to do is use the Server Variable for the Logged on user.
The easiest way to do this is to change the location where the web part is
getting the User ID. Here is the text of a KB article I have drafted for
this:
1. Open a WSS site in FrontPage 2003
2. Create a data view of the Announcements list
3. Data..Filter
4. Choose "Created by" in the Field Name
5. Choose "Equals" in the Comparison
6. Choose "[Current User]" in the Value
7. OK back to the page
This is excellent if you want to filter on the friendly name, but it is just
as likely that you will want to filter on the AUTH_USER or LOGON_USER server
variable (that is domain\user rather than User Name)
1. After completing steps 1-7, switch to Code view
2. Edit > Find
3. Find the <ParameterBinding Name="UserID" Location="CAMLVariable"
DefaultValue="CurrentUserName"/>
4. Replace this string with <ParameterBinding Name="UserID"
Location="ServerVariable(LOGON_USER)" DefaultValue="[ LOGON_USER ]"/>
5. Save the page and preview it in the browser
-- Thanks! John Jansen Microsoft Office FrontPage This posting is provided "AS IS" with no warranties, and confers no rights. "Stefan Nilsson" <nilssons@yahoo.com> wrote in message news:%23yrW5ug6DHA.2064@TK2MSFTNGP11.phx.gbl... > Hi, > > I'm using SharePoint 2003 and FrontPage 2003. I have created a simple web > part in FP 2003 that connects to a database and retrieves some records. One > of the columns contains domain user names (DomainName\UserName). I then set > a filter on the dataview to be: Show only rows where column UserName = > [Current User]. This works fine when I'm logged in as the Administrator of > the machine. > > As soon as I log in as another user, I get no results when applying the > filter to the web part. If I remove the filter, all the data is there, and > shows up. The users that are not working are all part of a global domain > security group in Active Directory. I have imported all the users from > Active Directory, and yes, I have created actual users as well. The users > however only mirror the groups in Active Directory, not the actual users (it > would be ay too many). > > The user can log in, and move around on the portal and subsites, add links > etc. But when it comes to displaying the data that is filtered, nothing > shows up. > > If anyone has any ideas, I would appreciate it. > > Best regards, > Stefan Nilsson > nilssons at yahoo dot com > >
- Next message: Mike: "WebPart Monitoring"
- Previous message: Robert Kellogg: "Upgrading Default Web Site"
- In reply to: Stefan Nilsson: "[Current User] filter problem"
- Next in thread: Stefan Nilsson: "Re: [Current User] filter problem"
- Reply: Stefan Nilsson: "Re: [Current User] filter problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|