AnsweredAssumed Answered

Calculated Nested IfElse?

Question asked by Kristen Dougherty on Oct 25, 2019
Latest reply on Oct 31, 2019 by Kristen Dougherty

Hello, we're using a module to track attendance. We use a points system and allow a certain number of bereavement days based on the relationship. I'm trying to calculate a field that will result the number of days allowed based on the dropdown value selected for the bereavement reason. I'm trying to result the number 3 for Parent, Child, and Sibling, and the number 1 for Mother or Father In Law, Grandparent, Grandchild, Daughter or Son In Law, and Brother or Sisten In Law. After reviewing a few other posts, I attempted a nested IfElse, but it is not working. I'm getting an error that IfElse requires 3 parameters which I thought I had covered in the formula. Any help is greatly appreciated. I will need to use this formula again to apply attendance points based on the dropdown vaule in the attendance type field as well.


ifElse($bereavementreason_c,"Spouse",3,ifElse($bereavementreason_c,"Parent",3,ifElse($bereavementreason_c,"Child",3,ifElse($bereavementreason_c,"Sibling",3,ifElse($bereavementreason_c,"Mother or Father In Law",1,ifElse($bereavementreason_c,"Grandparent",1,ifElse($bereavementreason_c,"Grandchild",1,ifElse($bereavementreason_c,"Daughter or Son In Law",1,ifElse($bereavementreason_c,"Brother or Sister In Law",1,0)))))))))