Sharepoint 2010 Client Object Model - Large Library - Find item without iteration -
i have large document library (at moment ~6000 documents) , need find document based on custom field value (custom column on library).
is there way of getting document without iterating through 6000 documents?
i understand iteration must occur @ point, prefer happen on sharepoint server side, rather transfer them client side cherry pick document.
thanks
you can query sharepoint. issue caml query executed on server , brings items match criteria specified. specify name of custom column search on , specify value find. efficiency , can ask few fields (document url example). so, not need iterate on documents in list find item.
you can find discussion here: http://msdn.microsoft.com/en-us/library/ee956524.aspx , can find examples how javascript or silvelight.
example caml:
camlquery camlquery = new camlquery(); camlquery.viewxml = @"<view> <query> <where> <eq> <fieldref name='fileleafref'/> <value type='text'>test.docx</value> </eq> </where> <rowlimit>1</rowlimit> </query> </view>";
Comments
Post a Comment