Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a question sort of related to this post. The default value of the CAML variable UserID is the CurrentUserName. Can that be set to different properties or is that fixed? For example, could you make it return the user id from the User Information List?

share|improve this question
    
Eric: Do you mean strictly in a DVWP or are you thinking more broadly? –  Marc D Anderson May 28 '11 at 4:29
    
In this case, I'm refering to in a DVWP specifically. –  PirateEric May 28 '11 at 11:33

2 Answers 2

UserID is simply a parameter which is bound to the CurrentUser CAML variable. SharePoint Designer creates this binding for you whenever you add a DVWP to a page.

UserID actually contains more information than just the name, but SharePoint interprets it differently depending on the context. If you output the value it contains with xsl:value-of, you'll see all of the details.

share|improve this answer
    
I've never thought to output it, I'll try that and see what goodies lie within. –  PirateEric May 28 '11 at 23:52
    
I've dumped it and it's just showing last name, first name in every instance I've tried. Is there a trick to making it dump it's entire contents? Or is that what you mean by it being dependant on the context? –  PirateEric May 31 '11 at 20:48
    
I just tried it and see the same thing as you. I could have sworn it worked differently the last time I looked at it. I also can't find ANYTHING on MSDN to help. Sorry. –  Marc D Anderson Jun 1 '11 at 3:20
    
Thanks for looking at it, time to Bing away, hopefully this will get some up votes and a little more attention. –  PirateEric Jun 1 '11 at 12:13
up vote 1 down vote accepted

I'm going to answer this as this is the only outcome, last name, first name. If anyone comes across any other definitive information on this and ways to output it, I'll unmark this as the answer and award them the points.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.