function getCompletedEmployeesList(){
var date = new Date();
var aTmp = new Array();
var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
firstDay = firstDay.getFullYear()+"-"+(firstDay.getMonth()+1)+"-"+firstDay.getDate();
var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
lastDay = lastDay.getFullYear()+"-"+(lastDay.getMonth()+1)+"-"+lastDay.getDate();
$().SPServices({
operation: "GetListItems",
async: false,
listName: "User Allocation List",
CAMLViewFields: "<
ViewFields
Properties
=
'True'
/>",
CAMLQuery: "<
Query
><
Where
And
Neq
FieldRef
Name
'ID'
/><
Value
Type
'Counter'
>0</
></
>
<
Leq
'Week_x002d_Ending'
IncludeTimeValue
'FALSE'
'DateTime'
>"+lastDay +
"</
Geq
>"+
firstDay +"</
>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var teamMember = $(this).attr("ows_TeamMember");
aTmp.push(teamMember);
});
}
return aTmp;
How to get table cell text with Javascript Create HTML table out of object array in Javascript
Maheshkumar S Tiwari edited Original. Comment: Added tags
TNJMAN edited Revision 1. Comment: made a code block and tried to fix headers
TNJMAN edited Revision 2. Comment: more formatting
TNJMAN edited Revision 3. Comment: code block...
TNJMAN edited Revision 5. Comment: code block formatter not working.
TNJMAN edited Revision 6. Comment: sometimes this site is frustrating! inserted code block again - 3rd time is the charm.
TNJMAN edited Revision 7. Comment: broken editing -- arrghh!
TNJMAN edited Revision 8. Comment: i will keep trying
TNJMAN edited Revision 9. Comment: finally!
TNJMAN edited Revision 10. Comment: Spiff it up.
TNJMAN edited Revision 12. Comment: wiki editor still broken.
You know, what would be great is for you to "run this code" and then capture an image of the table - how the "Team Member" field and "User Allocation List" look - then you can include an image here, and it will be more fabulous.