Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Why bother with XSLT?

$
0
0
What I've always done to get my rollup values was create a view with Counts/Averages or whatever other calculation. After that, it's a matter of AJAX'ing that page and scraping the values. If you are worried about the view being deleted, you can create the view on the fly first, if it's not present.

A very simple implementation:
$.ajax("/site/Lists/ProjectTasks/RollupView.aspx", {
    success: function(data, status) {
        var $assignedTo = $(data).find("div[name='AssignedTo']").closest("th"),
            assignedToIndex = $assignedTo.index()
            $countsRow = $assignedTo.closest("tr").next(),
            $count = $countsRow.find("td").eq( assignedToIndex )
        ;

        console.log( $count.text() )
    }
});
Cheers,
Matthew

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>