how would I do show the total number of cases a company has that are not resolved in a calculated field?

I would like to show how many cases a company has got open that have not been resolved. I would like to show this in a calculated field inside of an account.

  • I would use the Intelligence Pane.

    I believe there is a "Case Summary" Dashlet out of the box that you can add to an Account to see cases in various statuses.

    To have it as a field in the Accounts module you would need to have a non-db  field that is calculated via logic hook when the record is loaded, and though it's not hard to do it would not give any more information (actually less) than the dashlet.

    HTH

    FrancescaS

  • In the end what I did was add a field called status_number_c in the cases module that represented 0 if the case was closed and 1 if the case was not closed. This is the formula:

    ifElse(equal($status,"closed"),"0","1")

    I did not add this field into the cases layout.

    I then added another field into the accounts module that did a rollupSum of the status_number_c field ( the one I created above ). This is the formula:

    rollupSum($cases,"status_number_c")

    This will add up all of the status_number_c numbers so its still effectively counting the closed ones, however because if the status is set to closed the status_number_c value will be set to 0 the number will not change when the formula adds the closed cases to the total.

    I probably explained this really poorly but it took me less than 2 minutes to do once i'd thought of a way to do it. Hope it helps anyone else out!