startRender function Condition
startRender function Condition
Link to test case: https://jsfiddle.net/f4c5wLd6/3/
Hello, I have come a long way with this DataTable, and there is only one issue left that I still cannot seem to solve.
What it does:
- GETS data from SharePoint list and populates to the DataTable.
- Filters through all the data objects and only displays list items if the dates corresponding to them are dates within the current week.
- Manipulates Monday - Friday columns by reading the hidden dayStatus column value corresponding to the day. Then depending on that value adds a styling to that cell (green, yellow, or red)
What else I need it to do:
- For each "Name/Employee" under each department, depending on the MondayStatus/Monday (applies to all days) cell style color (red, green, yellow), color the row for that "Name". If 4/5 + of those cells are green, color the name row green, if 3/5 are green, color the row yellow, and if less, color it red.
Answers
Is this same question you have in this thread? My suggestion was to use
rows().every()
, which your test has in that thread, to loop though all the rows in the group and compile your data to determine what to apply to the name row.You can use the
level
parameter to only do the calculation if the level is1
, then Name.Kevin