New answers tagged

0

You must first understand how it works and how to write.Then you can do it on your own. How To Write Dynamic CAML : While writing CAML query, you must understand the architecture how it works. It is pretty simple. You just have to do logical AND/OR operators. Any operator must have 2 conditions to combine and test. SCENARIO 1 : This is 1 Operator use ...


0

Replace following block from your code CmalQuery = "<View><Query><Where><Or>"; while (e.moveNext()) { fieldName = e.get_current(); CmalQuery += "<Contains><FieldRef Name='"+fieldName+"' /><Value Type='Text'>" + txtValue + "</Value></Contains>"; console.log(...


0

This is for Sharepoint 2013. When a CAML query is issued against a list: if the security context is a user who is not an administrator and the query contains a filter that uses the "IN" clause. More than 60 values are passed for a particular indexed field that includes the "In" clause. The query is throttled, and the following error message is shown to ...


2

You forgot <View> tag in the CAML query, please see an example below: using (var ctx = new ClientContext("http://sharepoint")) { var itemId = int.Parse("001"); var list = ctx.Web.Lists.GetByTitle("Documents"); var query = new CamlQuery(); query.ViewXml = string.Format( ...


-1

Use the below code to retrieve only one document string RefId=Page.Request.QueryString["Id"]; SPDocumentLibrary list = (SPDocumentLibrary)web.Lists["DocumentLibrary"]; var spQuery = new SPQuery(); spQuery.Query = "<Where><Eq><FieldRef Name='ID' /><Value Type='Text'>" + RefId + "</Value></Eq>&...


0

i have found the problem...it is because after deleting item listItemEnumerator is getting.movenext() results in exception. changes made: listItemEnumerator.moveNext(); while (listItemEnumerator.get_current()) { ...


0

Using below code you will get recurring events as distinct items using SPServices. var startDate = "2012-05-12T12:00:00Z"; // Our example will show the month of May 2012 $().SPServices({ operation: "GetListItems", async: false, listName: "My Calendar", CAMLViewFields: "<ViewFields>" + "<FieldRef Name='Title' />" + ...


0

If your using two lookupfields, make sure that the two columns are added sepeartely but the second column should not be added as extra column while adding the first column from the same list. it will fix the issue


0

Ok..did you try in the developer tool? Try running the code in developer tool and see if you are hitting the elements you are calling. Its working sometime and sometime its not working can be of several reason. The first reason I can think of DOM not getting loaded. Once the focus is on element, the scripts works. Try loading your whole function inside ...


3

You need to use below updated code as your CAML query. SPQuery query = new SPQuery(); query.Query = "<Where><And><Eq><FieldRef LookupId='TRUE' Name='Program'/><Value Type='Lookup'>6</Value></Eq><Eq><FieldRef LookupId='TRUE' Name='Responsible_x0020_Group'/><Value Type='Lookup'>9</Value></Eq&...


5

Your caml query should have <Value Type="Lookup">9</Value> instead of <Value Type="Integer">9</Value>



Top 50 recent answers are included