2

I want to build a custom formula field on the Case object. I have a picklist field called Efforts. Picklist field values are 1 min, 15 min, 30 min, 1 hour, 2 hours, 4 hours, 1 day, More than 1 day

I am building the formula field like below.

Formula Field(Number) - Return type is number.

Formula Field =

CASE(
     TEXT(Effort__c ),
     "5 min", 5,
     "15 min", 15,
     "30 min", 30,
     "1 hour", 60,
     "2 hours", 120,
     "4 hours", 240,
     "More than 1 day", 960,
     "1 day", 480, 
     0
)

The problem is whenever the field Effort__c is null then this formula field is showing the value 0 (as an else condition in the CASE). I want this to be null if the picklist is null.

I've checked Treat blank fields as blanks

Any help is appreciable thanks!

1
  • Try replacing 0 by null
    – Akram G
    Dec 15, 2016 at 10:22

1 Answer 1

4

You just need to pass the default NULL instead of 0

Formula Field =

CASE(
     TEXT(Effort__c ),
     "5 min", 5,
     "15 min", 15,
     "30 min", 30,
     "1 hour", 60,
     "2 hours", 120,
     "4 hours", 240,
     "More than 1 day", 960,
     "1 day", 480, 
     NULL
)
1
  • Simple. But learned unknown. Thanks
    – Prince
    Dec 15, 2016 at 10:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .