1

I want to build a custom formula field in case object. I have 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 Effor__c is null then this formula field showing the value 0 (as a else condition in 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!

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

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
)
| improve this answer | |
  • Simple. But learned unknown. Thanks – Prince Dec 15 '16 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.