SharePoint's CAML query the "Created By" field with username
Posted
by yellowblood
on Stack Overflow
See other posts from Stack Overflow
or by yellowblood
Published on 2010-05-20T12:07:21Z
Indexed on
2010/05/20
14:00 UTC
Read the original article
Hit count: 412
sharepoint
|caml
Hey, I have a form for administrators where they insert a user name ("domain\name") and the code gets and sets some information out of it.
It's a huge project and some of the lists contain the username as a string ("domain\name"), but some lists only count on the "Created By" column, which is auto-created.
I want to know what's the fastest way to query these lists using the username string. I tried to use the same query as the one I use for the first kind of lists and it obviously didn't work -
<Where><Eq><FieldRef Name='UserName'/><Value Type='Text'>domain\\username</Value></Eq></Where>
Thank you.
© Stack Overflow or respective owner