Code, Code, Revolution!
Get list items by lookup id, not value:
<Eq> <FieldRef Name="Category" LookupId="TRUE" /> <Value Type="Integer">10</Value> </Eq>
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]).
<Eq> <FieldRef Name="AssignedTo" /> <Value Type="Integer"><UserID Type="Integer"/></Value> </Eq>
The UserID element in CAML is the same as [Me] in a list filter.
With this blog I try to provide useful tips and solutions for programming .NET, Objective-C and more. My name is Björn Sållarp, and I love writing code.
Leave a reply