HOWTO: Use Sugar Logic Rollups
13 Feb, 2012Posted By: John Mertic
A great new feature that came with Sugar 6.3 is the ability to do rollups, meaning that you can do a calculation over a single field in all of the related records of a related module. You can do four different types of rollups in Sugar 6.3:
- rollupMax – return the max value of all of the related module records
- rollupMin – return the min value of all of the related module records
- rollupSum – return the sum value of all of the related module records
- rollupAve – return the average value of all of the related module records
- count – return the total number of related module records
Here’s a great use case for this; suppose you want to add a field to the Accounts module which sums the average Opportunity amount for an account. Just add a new field with this equation as the calculated field:
rollupAve($opportunities,"amount")
Or maybe you are looking for the total number of Cases submitted by a Contact. Try this formula on a new field:
count($cases,"amount")
This enables all sorts of new abilities. Have you used these fields? If so, sound off in the comments on how you use these functions.