Just stumbled across this excelent post, I would like to return the average time difference as opposed to the total as demonstrated in http://www.endusersharepoint.com/?p=1106 is this easy to do?
Thanks
Eoin
By default, show groupings: Expanded
You will no longer have the total, you must use “Collapsed” I think because the total comes from the rendering of “expanding” the group, correct?
]]>=TEXT([Outage End]-[Outage Start],”h:mm”)
Seems to be working just fine if difference is under 24 hours.
]]>Thanks for the help and all the great scripts. :)
]]>Remember, this script only sees what was rendered to the page. Stuff in initially collapsed groups has not been rendered yet.
]]>If we just use the “count” row as an placeholder for our calculation, shouldn’t we be able to hide the “count” text and just keep the “totals” text?
I took a quick look at your code but I’m not familiar with neither jQuery nor SharePoint code in order to figure out how to do it.
]]>Thanks a lot, it works as intended now.
Would it be possible to:
a. Add the totals for a two level nested grouping, for each grouping?
b. Add the totals for the entire view?
The reason I want to calculate for two levels is that I first group on the month of the start time for the list object and I then group on the actual project.
We need to present both the total amount of hours for each project and also for the entire month.
I would also like to calculate all the hours spent for this customer no matter month or project(the entire view).
]]>groupName comes from the JavaScript. SP passes a parameter called groupName, I use the same parameter in my script.
If your column did not calculate, chances are you have the col variable set to the wrong column or the column is not a time or time/date field.
You also need to have something else in the list counted or summed (using standard oob view features) to provide the aggregation row where we place the time sum.
]]>there is no such thing as “groupName” in my HTML when looking at the source code of a grouped list.
When adding your script the groups expand so i guess it does something but the column does not get calculated properly (no result at all) and I assume that this is due to the missing property.
Any ideas?
]]>