Re: [Current User] filter problem

From: John Jansen \(MSFT\) (johnjan_at_online.microsoft.com)
Date: 02/03/04


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
>
>


Relevant Pages

  • Re: ruby-ldap and paged results on windows
    ... I'm trying to get paged results to work with ruby-ldap against ... Paged controls started life as a hack to make Active Directory ... For example this filter works fine in ruby-ldap ... I can rewrite my stuff to use the Net::LDAP filters, ...
    (comp.lang.ruby)
  • Re: [Current User] filter problem
    ... from a Microsoft resource. ... filter to be on you need to change the ParameterBinding ... >> security group in Active Directory. ... >> Stefan Nilsson ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: [Current User] filter problem
    ... >>filter to the web part. ... >>security group in Active Directory. ... >>Best regards, ... >>Stefan Nilsson ...
    (microsoft.public.sharepoint.windowsservices)
  • Import Active Dicrectorys Mail Enabled Contacts?
    ... when I am importing accounts from Active Directory for the "People" search. ... This query plus the one from the link worked well in Active Directory Users ... However, when I put this filter into SPS, I got the following error when it ...
    (microsoft.public.sharepoint.portalserver.development)
  • [Current User] filter problem
    ... filter to the web part. ... security group in Active Directory. ... Active Directory, and yes, I have created actual users as well. ... Stefan Nilsson ...
    (microsoft.public.sharepoint.windowsservices)

Loading