function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gina199Gina199 

Want to build a formula field that calculates a total number of hours

I need to develop a formula field that does the following:

 

Calculates the total number of volunteer hours the contact has worked for the current calendar year (zeros out at new year).

 

 

 

 

 

BuellBuell
How/where are you tracking the hours?
Gina199Gina199

Right now there is no way to track the hours. 

 

My thought was to have a custom field on the contact object titled "Last # Hrs Volunteered" that a user would enter when a volunteer works.  There would also be a formula field titled "Total # hours volunteered."  When a user enters a number into the field "Last # Hrs Volunteered", a calculation would be made and saved in the "Total # hours volunteered" field.  This can't be done with just the 2 fields because the formula field can't calculate itself. 

 

This seems like a calculation that should be relatively a simple but I just don't know how you can have a rolling calculation.  In addition to the above calculation, the volunteer hours need to be calculated for this year, so at the end of the year, the hours would revert to zero for all volunteers.

 

 

Steve :-/Steve :-/

Have you thought about using Event records to track this?  

 

Events have Start and End Times and Duration that can be totalled, averaged, etc...