Home › Forums › vLooup for SharePoint › Group & Count
- This topic has 4 replies, 3 voices, and was last updated 7 years, 11 months ago by Alexander Bautz.
-
AuthorPosts
-
-
January 5, 2017 at 19:50 #14882
I would like to use the GroupBy option and show the count of items in that group on the header… is there a specific header style or label code that I could use to show the count in the header?
-
January 10, 2017 at 19:26 #14973
Unfortunately there is not built in method for showing the count in the group header. The only built in method is to use the “Totals” option, but this will only show when you have expanded the group.
Alexander
-
January 16, 2017 at 23:50 #15082
I tried to write some code to accomplish this using the vLookupIsLoadedCallback function but I can’t get it to work. I am able to use alerts to validate that the callback and my function are getting called, but the object I build is empty. It works perfectly in the javascript console but not when using the DFFS Custom JS tab. Could you take a look and see what I am doing wrong?
Also, I couldn’t find a way to get the subtotals from each group using the vlookup data object. It seemed to only contain the overall total.
function vLookupIsLoadedCallback(fin){ if(fin === "vLookupTasks"){ alert("in callback"); appendSubtotals(); } } function appendSubtotals() { // create nodeset of TRs that contain complete progressbar divs var apc = $(".vLookup_total_vLookupTasks .vLookupProgressBarOuter").parent(); alert("in function"); // iterate through the nodeset $.each(apc, function() { // grab the text var pcnt = $(this).text(); // find the parent element that lets us find the header var par = $(this).parents(".vLookupGroup").siblings(".vLookupGroupHeader"); // append the percentcomplete text to the header $(par).append(" -" + pcnt); }); }
- This reply was modified 7 years, 11 months ago by DCH.
-
January 18, 2017 at 15:37 #15119
I found that if I wrap my function in a setTimeout for 10ms then it works fine.
-
January 18, 2017 at 19:52 #15125
I’m glad you found a workaround.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.