New answers tagged

0

You can use Geq and Leq to formulate the range query as below query.set_viewXml('<View><Query><Where><And><Geq><FieldRef Name=\'EventDate\'/>' + '<Value IncludeTimeValue=\'TRUE\' Type=\'DateTime\'>' + fromTime.toISOString() + '</Value></Geq><Leq><FieldRef Name=\'EndDate\' /><Value ...


0

you are missing missing opening tag <Where>.Your code must be var camlQuery = new SP.CamlQuery(); camlQuery.set_viewXml('<View><Query><Where><And><Eq><FieldRef Name=\'EventDate\' /><Value IncludeTimeValue=\'TRUE\' Type=\'DateTime\'>' + fromTime.toISOString() + '</Value></Eq><Eq><...


0

Should you check this code Create a new function and rename it as bulkupdate Function BulkUpdate() { for(var i = 1; i<= 5; i++){ updateListItem(int i); } } } var siteUrl = '/sites/MySiteCollection'; function updateListItem(int i) { var clientContext = new SP.ClientContext(siteUrl); var oList = clientContext.get_web()....


0

use data source type xml, connection string: http://SiteName/_vti_bin/Lists.asmx the query is: <Query> <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction> <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems"> <Parameters> <Parameter ...


1

Try this code. Added some safe checks void ddCarNumber_TextChanged(object sender, EventArgs e) { try { SPWeb myWEB = SPContext.Current.Web; SPList myList = myWEB.Lists.TryGetList("WayBill"); if(myList != null) { SPQuery myQuery = new SPQuery(); myQuery.Query = @"<OrderBy> ...


1

Try this below method: void ddCarNumber_TextChanged(object sender, EventArgs e) { try { SPWeb myWEB = SPContext.Current.Web; SPList myList = myWEB.Lists["WayBill"]; SPQuery myQuery = new SPQuery(); myQuery.Query = "<OrderBy><FieldRef Name='Created' Ascending='FALSE' /></OrderBy><Where><Eq&...


2

Can you try putting <RowLimit>1</RowLimit> in the Query. The row limit will return only the one last item.


2

Here string myEndMil = myItemCol[0]["endMil"].ToString(); you are assuming you have gotten at least one result back. That might not be the case! You should check first that myItemCol.Count > 0 There is another possible issue at the same line (string myEndMil = myItemCol[0]["endMil"].ToString();) You are requesting a column endMil that you might not ...



Top 50 recent answers are included