I have been searching this site for an answer but I have been unable to find anything that will work.
I have been trouble pulling the tasks of the current user from a subsite. I am using SharePoint 2007 and I want to be able to display tasks that are assigned to the logged in user and has not been completed yet. I suspect something is wrong with CAML. When the query is not included, the CEWP displays all the tasks in the task list.
var soapEnv = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \ <soapenv:Body> \ <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \ <listName>Tasks</listName> \ <viewFields> \ <ViewFields> \ <FieldRef Name='Title' /> \ <FieldRef Name='ID' /> \ </ViewFields> \ </viewFields> \ <query> \ <Query> \ <Where> \ <And> \ <Eq> \ <FieldRef Name=’AssignedTo’></FieldRef> \ <Value Type=’Integer’><UserID Type=’Integer’ /></Value> \ </Eq> \ <Neq> \ <FieldRef Name=’Status’/> \ <Value Type=’Text’>Completed</Value> \ </Neq> \ </And> \ </Where> \ </Query> \ </query> \ </GetListItems> \ </soapenv:Body> \ </soapenv:Envelope>";
Does anyone have any ideas?