Hot answers tagged caml-query
As far as I know it is not supported to apply $filter or $select expression for the endpoint: http://<sitecollection>/<site>/_api/web/lists(listid)/getItems(query) To summarize: CAML and OData query could not be combined. From another hand, since expanding of User Fields is not supported in CSOM/REST i would suggest to construct your ...
I don't think you use the correct columns' names. You're using the names as seen by the SharePoint search engine, not the internal names of the fields. For instance, ows_Title should be Title, etc. On the other side, I don't think the nested OR are wrong here, they're just up-side-down.
The whole Or section looks wrong, try using BIWUG CAML Designer to craft your query, then use that in your SPServices function. Also, you need to use the internal field names, not the web service returned fields (Description1 vs ows_Description1 etc). http://www.biwug.be/resources Typical nested Ors would look like this: <Where> <Or> ...
We need to be careful about the Async calls. I would suggest don't call getCurrentLoginUserDetails() immediately, Let getCurrentUser() complete its async call and then you can proceed with your function to retrieve list items based on LoggedInUser. So based on above explanation, I can propose following solution. Improvements in your function ...
In that case you don't need to specify CamlQuery.FolderServerRelativeUrl property at all. The following example demonstrates how to retrieve items of top folder in List: var list = ctx.Web.Lists.GetByTitle(listTitle); var items = list.GetItems(new CamlQuery()); ctx.Load(items); ctx.ExecuteQuery(); If you are interested in returning only items associated ...
You just need this: SPQuery query = new SPQuery(); SPListItemCollection myItems = list.GetItems(query); By default you get the files under the root folder. Scopes in a CAML Query
Use SPUtility.CreateISO8601DateTimeFromSystemDateTime to create relevant DateTime string. DateTime firstDay = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); string firstDayValue = SPUtility.CreateISO8601DateTimeFromSystemDateTime(firstDay); string firstDayValueplus1Month = SPUtility.CreateISO8601DateTimeFromSystemDateTime(firstDay.AddMonths(1)); ...
There is a GUI editor on Visual Studio Gallery CAML Query Builder
Only top voted, non community-wiki answers of a minimum length are eligible