Re: [Current User] filter problem
From: Stefan Nilsson (nilssons_at_yahoo.com)
Date: 02/05/04
- Next message: Scott Futryk: "Windows Media 9 web part with FP2003"
- Previous message: MS: "Re: Frontpage 2003 and WSS"
- In reply to: John Jansen \(MSFT\): "Re: [Current User] filter problem"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 5 Feb 2004 15:29:11 -0800
Hi,
For anyone that may be interested, I managed to get the following response
from a Microsoft resource.
-------- Start -------
[Current User] is a CAML variable that is pulled from the User table -
sometimes the value is the user's Friendly name, sometimes the logon name.
There is an issue in that WSS only looks to Active Directory once, and
depending upon network traffic, this call can fail. If it fails, the values
get populated in inconsistent ways.
The work outlined below should be done in FrontPage 2003.
If you want the filter to be the remond\user string, then after you set the
filter to be on [Current User] you need to change the ParameterBinding
location. By default it is coming from the CAML, you need to change it to
come from the ServerVariable collection.
Set the filter to be [Current User]
1.. Switch to code view
2.. Find the line of code that says this:
<ParameterBinding Name="UserID" Location="CAMLVariable"
DefaultValue="CurrentUserName"/>
4.. Change this line of code to say this:
<ParameterBinding Name="UserID" Location="ServerVariable(LOGON_USER)"
DefaultValue="CurrentUserName"/>
5.. Save the page
That should do it for you. To test this value, you can simply remove the
filter and add a tag to the xsl style***: <xsl:value-of select="$UserID"/>
and see what value is displayed. We do a direct string comparison in the
web part framework.
-------- End -------
Best regards,
Stefan Nilsson
nilssons at yahoo dot com
"John Jansen (MSFT)" <johnjan@online.microsoft.com> wrote in message
news:%23Sq1iko6DHA.2712@tk2msftngp13.phx.gbl...
> 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: Scott Futryk: "Windows Media 9 web part with FP2003"
- Previous message: MS: "Re: Frontpage 2003 and WSS"
- In reply to: John Jansen \(MSFT\): "Re: [Current User] filter problem"
- Messages sorted by: [ date ] [ thread ]