New answers tagged

0

You need to ExpandRecurrence http://sharepointchan.blogspot.hr/2011/10/situation-i-want-to-get-all-calendar.html Or with jquery.SPServices http://spservices.codeplex.com/discussions/254560 CAMLViewFields: "<ViewFields>" + "<FieldRef Name='Title' />" + "<FieldRef Name='EventDate' />" + ...


-1

the syntax is each < and> statement content 2 queries. section <and> is one query in another <and> statement change the query to: "<View>" + "<Query>" + "<Where>" + "<And>" + "<And>" + "<And>" + <------first "<Eq><FieldRef Name='...


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

The itemArray is not needed (unless you are using it elsewhere) because this line: clientContext.load(itemArray[itemArray.length-1]); is also not needed and may in fact be causing you problems. To update a list item all you need is that update() call followed by the clientContext.executeQueryAsync call.


3

operation: "GetListItems", async: false, listName: "Marketing Requests", viewName: "54E61A50-B5A9-4D59-91B9-EA9D280B8C24", CAMLRowLimit: 5000, CAMLQuery: "<Query><Where><Eq><FieldRef Name='Assign_x0020_To'/><Value Type='User' >" + selectedDesignerOpenProjs + "</Value></Eq></Where></Query>", completefunc: ...


1

You can try DateTime enddate = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day); DateTime startDate = enddate.AddDays(-7); query.Query = "<Where>" + "<And>" + "<Eq><FieldRef Name='Kompania' /><Value Type='Text'>" + ...


2

In CAML Query you should use field internal name instead of Display Name. You can get the internal name for a column by browsing to the List Settings > Edit Column and look at the QueryString value Field.


2

queryMuaj.Query = "<OrderBy>" + "<FieldRef Name ='testb' Ascending = 'TRUE'/>" + "</OrderBy>" + "<Where>" + "<And>"+ "<And>" + "<Geq>" + "<...


1

Try this query: <OrderBy> <FieldRef Name ='testb' Ascending = 'TRUE'/> </OrderBy> <Where> <And> <Eq><FieldRef Name='Team' /><Value Type='Text'>" + selvalcomp+ "</Value></Eq> <And> <Geq><FieldRef Name='testb' /><Value Type='DateTime' IncludeTimeValue='FALSE'&...


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


0

Marked answer won't work (at least in SP 2010) unless you change the Today Offset bit to "Today OffsetDays" thus having: <Where> <And> <Geq> <FieldRef Name='EventDate' /> <Value Type='DateTime'> <Today OffsetDays='-30' /> </Value> </Geq> <Leq> &...


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


0

I recommend this counter trick for returning all records from a list. You're probably only getting the current month because you haven't declared a view or a CAML query, so you're getting data from the default view, which is probably the current month. Alternatively, you could create a list-style view of all events in your Calendar list.


7

If you want to compare with both conditions than use AND: @"<Where> <And> <Eq> <FieldRef Name='ReportsTo' /> <Value Type='Text'>" + reportsTo + @"</Value> </Eq> <Eq> <FieldRef Name='Team' /> <Value Type='Text'>"+ selected+ @"</Value> </Eq> </And> </...


1

@"<Where> <And> <Eq><FieldRef Name='ReportsTo' /><Value Type='Text'>" + reportsTo + @"</Value></Eq> <Eq><FieldRef Name='Team' /><Value Type='Text'>"+ selected+ @"</Value></Eq> </And> </Where>"


1

You can use like this: @"<Where> <And> <Eq> <FieldRef Name='ReportsTo' /> <Value Type='Text'>" + reportsTo + @"</Value> </Eq> <Eq> <FieldRef Name='Team' /> <Value Type='Text'>"+ selected+ @"</Value> </Eq> </And> </Where>" NOTE: You can also use <...


1

Wrap your conditions in <And>...</And> inside <Where> Reference: https://msdn.microsoft.com/en-us/library/office/ms196939.aspx @"<Where> <And> <Eq> <FieldRef Name='ReportsTo' /> <Value Type='Text'>" + reportsTo + @"</Value> </Eq> <Eq> &...



Top 50 recent answers are included