Tag Info

Hot answers tagged

3

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 ...


2

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.


2

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> ...


1

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 ...


1

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 ...


1

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


1

As far as I see, the value of the _ModerationStatus is stored as numbers, corresponding the values in the SPModerationStatusType enumeration. You can translate the numerical values by defining your own moderationStatusType array in JavaScript as shown below: var moderationStatusType = [ "Approved", "Denied", "Pending", "Draft", "Scheduled" ]; var ...


1

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)); ...


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