Thursday, May 19, 2011

Sharepoint CAML quick useful tips

Get list items by lookup id, not value:


 



Notice that LookupId=”TRUE” is added to the FieldRef and that the value type is Integer, not Lookup.

Get list items that are assigned to the current user ([Me]).

 
 



The UserID element in CAML is the same as [Me] in a list filter. This work well with Allow Multi user People & Groups list fields as well.

No comments:

Post a Comment