New answers tagged

0

Try this: string query = "<Where><Eq><FieldRef Name=\"MultiLookupFieldName\" /><Value Type=\"LookupMulti\">" + DisplayValue + "</Value></Eq></Where>"; SPQuery spQuery = new SPQuery(); spQuery.Query = query; SPListItemCollection items = list.GetItems(sp Query);


1

By using code from How to build a CAML query with several nested OR's using a loop and its answser http://sharepoint.stackexchange.com/a/167266/35604, you can easily simplify your code. Now you have all these methods that help you building nested Or and And queries, simply do this: List<string> queries = new List<string>(); if ...


0

There is no good solutions to this, other than creating a string and appending subqueries underneath. I faced this a few years back, and ended up with appending subqueries to a big query. Though, you should go away with all the combinations. Instead having something like this : List<string>partCollection = new List<string>(); if ...


0

The cause was SharePoint behaviour. Here are the steps to reproduce: Go into Term Store Management and create a custom termset. Create a new site field based on that termset. Add the field to the list. Add some list items with values from the termset. Go into Term Store Management, edit the termset, and select Use this Term Set for Site Navigation. At ...


0

Pretty much, although you would want to left outer join your tables. Have a look at this MSDN article for reference.


1

Am I crazy or should you need Get, not Post? url: query, method: "POST", headers: {


0

try this... replace this data: JSON.stringify({ query: { __metadata: { type: "SP.CamlQuery" }, ViewXml: "<ViewFields><FieldRef Name='FileLeafRef' /> <FieldRef Name='Title' /> </ViewFields> <QueryOptions> ...


0

I would highly suggest using CamlDesigner. I don't want to go through your caml query because your formatting is horrendous. Please clean that up if you want us to look at it. Here is an example Caml Query i made with CamlDesigner on a random list <Where> <And> <Or> <And> <Eq> ...


0

Try to replace <UserID /> tag by UserID number (int). Moreover, if you want to ensure that your query is correct, check the server response: if you receive a 400 Bad Request HTTP Error, then it's very probable that your query is malformed. If the answer is 200 OK, then you should check the rest of the code.


0

You could use the XmlReader class: https://msdn.microsoft.com/en-us/library/system.xml.xmlreader%28v=vs.95%29.aspx or the XmlDocument class (my preference): https://msdn.microsoft.com/en-us/library/system.xml.xmldocument.loadxml%28v=vs.110%29.aspx You'd do something like: XmlDocument doc = new XmlDocument(); doc.LoadXml(mobjView.Query); XmlNodeList ...


0

I have just tested this on SP2013 and it works with periods without problems, so it must be something else.


0

If you return a column containing Site Name within it, you can then: <GroupBy><FieldRef Name="**SiteNameField**" /></GroupBy> Hope this helps


1

I can confirm that this architecture can work. I have developed multiple SharePoint 2013 custom visual web parts that utilize single page Angularjs apps to display their data in the past and recently I had to use Angularjs in conjunction with SharePoint 2010 too. Usually, my web parts have to display tabular data, and for this reason I found out that the ...


1

The following example shows how to retrieve all of the files in a folder. url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files method: GET headers: Authorization: "Bearer " + accessToken accept: "application/json;odata=verbose" or "application/atom+xml" Does this help? Source


0

CAML query will not be able to handle this for you as far as I know. Updates to columns are logged in the audit system of SharePoint and the history tables. You can't scan a list looking for a change to a specific column using CAML query. It won't have that level of refinement. Your only option is to use code to view the version history of the item and ...


0

Constellation Solutions has a low-cost employee anniversary and birthday solution that can be added to an on-prem or Office 365 instance of SharePoint. It uses the User Profile service to pull the current employees. You can find out more information at Employee Birthdays and Anniversaries in SharePoint


1

You don't need to pass count as a parameter as you can get it from queries Inside the method RecursiveNestedOr itself (also, rename parameter query as queries). Otherwise, your recursion looks fine to me. Here's how I'd "simplified" it, using LINQ (add using System.Linq): public static string RecursiveNestedOr(IEnumerable<string> queries) { ...


0

In the end, this error message was caused by SharePoint web application being configured to enable Windows authentication as well as one trusted Identity provider. So I guess CAML Query Builder got confused (or SharePoint maybe?). Workaround for my problem was to copy folder containing the list to a new empty SharePoint farm solution, deploy the solution to ...



Top 50 recent answers are included