Display Name instead of Logon Name

D

Davide Lomonaco

I need to make a DataView WebPart on a WSS Site for
filtering users data by Logon Name.
But using $UserID CAML Variable data is filtered by
Display Name.
How can I pass Logon name instead of Display Name?

Following default declaration of UserID variable in
DataView WebPart Properties --> Parameters Editor:
<ParameterBinding Name="UserID" Location="CAMLVariable"
DefaultValue="CurrentUserName"/>

Best Regards
Davide Lomonaco
 
J

John Jansen \(MSFT\)

Hi Davide,

After you insert the Data View Web Part, you need to create a parameter (or
modify a default parameter) to take in a ServerVariable.

1.. ServerVariable
1.. Go into code view in FrontPage
2.. Replace <ParameterBinding Name="filterParam" Location="
PostBack;Connection"/>" with "<ParameterBinding Name="filterParam"
Location="PostBack;Connection;ServerVariable(AUTH_USER)"/>" (without the
surrounding quotations and where 'AUTH_USER' is the name of the server
variable you want to use as documented on MSDN)
3.. Create a filter from the Data..Filter menu that has your column name
== [Input Paramter]
4.. Save the page and preview in browser
5.. If you had a title that matched your login (domain\username, for
example) then you would see a view filtered to just show you those items
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top