Hi I am currently writing a sharepoint add in application which reads and writes to sharepoint lists.
For one of the lists I want to retrieve a list item based on the user logged in and also based on a start and end date that the user enters in a html form.
Is there anyway I can do this using CAML Queries?
I am able to retrieve the list items submitted by the user currently logged in using the following query:
camlQueryRequest.set_viewXml(
"<View><Query><Where><Eq><FieldRef Name='UserName' LookupId='True'/><Value Type='Lookup'>" + _spPageContextInfo.userId + "</Value></Eq></Where></Query></View>"
);
I just don't know how to have the start and end dates as query conditions also.
FYI..
the start date in the list is named 'DateFrom' the end date is named 'DateTo'
Date variables in the function are as follows:
var dateFrom = document.getElementById("dateFrom").value;
var dateTo = document.getElementById("dateFrom").value;
Thanks for any help/suggestions.