Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove domain from "domain\username" using "Current User&q

Status
Not open for further replies.

ColonelBlue

Technical User
Jun 24, 2004
110
US
How to remove domain from "domain\username" using "Current User" filter in Dataview using SharePoint Designer?
Is there a way to do this with the SQL statement?

I am trying to filter a table using the "Current User" filter in DataView. I am trying to match the "LoginUser" column to the "Current User filter".

But here's my dilemma, the "LoginUser" values only have the "username" value sans the "domain\". So when I try to filter "LoginUser" to equal the "Current User" it fails because "Content User" has "domain\" appended to to it.

For example:
"BGates" will not equal "Redmond\BGates"
I would like "BGates" to equal "BGates".

Is there a way to use a SQL Statement to do this?
Thank you in advance.
 
Filter the name against: replace([user field],'domain\','')
 
Hello and thank you.

"Current User" somehow gets turned into @UserID when I look at the SQL Statement so then it would be

replace([@userID],'domain\','')

Does that sound right?

I will try tomorrow at work.
And let you know!

Gracious thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top