Question about the Lists Web Service - GetListItems operation

Feb 22, 2011 at 5:53 PM

Does anyone know things are handled if, when calling the GetListItems Operation in the Lists Web Service, you specify a CAML query but do not specify a View.

In this case, is the default View still applied even though a CAML query is provided?

In other words, in this case, that is, when you do not specify a View but do specify a CAML query, could the default list view potentially constrain what the CAML query might have otherwise returned (so there could be less data in the response XML than there should be)? If this is the case than I suppose its important to keep in mind that the View that GetListItems uses might need to be wider and/or taller than the CAML query, and in any event understand the ramifications if it isn't.

Thanks for illuminating this further.

Coordinator
Feb 22, 2011 at 5:57 PM

Yes, by default, the default view is used. It seems that if you specify any parameter which describes something outside of that view that you essentially get you "own" view. As with so many things about the Web Services, the documentation doesn't give us anything to go on here, but this is my experience. In fact, in the "value added" functions in SPServices, I generally set

CAMLRowLimit: 0

which eliminates any paging or item limits, but also has the effect of giving me my "own" view.

M.