You need to sign in to do that

Don't have an account?

kolakishore.salesfo1.3895976580747668E12

# IF( Seats_Category__c = Box),100 IF( Seats_Category__c = Class-A),75 IF(Seats_Category__c= Class_B),50 IF(Seats_Category__c= Class-C),25,0 ) ) ) )

Hi ,

Could anyone help me out in the below function..Actually i need to apply to formula to the field which depends on some other field.

I created a picklist field which contains BOX,Class-A,Class_B,Class-C.

If anyone selected BOX in that picklist field then automatically Ticket fare has to reflect as 100,if they selected Class-A then 75 has to reflect and so on.....

I written a formula....But it is not working out...

IF( Ispickval(Seats_Category__c ," Box"),100

Ispickval( Seats_Category__c ,"Class-A"),75

Ispickval(Seats_Category__c," Class_B"),50

Ispickval(Seats_Category__c," Class-C"),25,0

)

Could anyone help me out in the below function..Actually i need to apply to formula to the field which depends on some other field.

I created a picklist field which contains BOX,Class-A,Class_B,Class-C.

If anyone selected BOX in that picklist field then automatically Ticket fare has to reflect as 100,if they selected Class-A then 75 has to reflect and so on.....

I written a formula....But it is not working out...

IF( Ispickval(Seats_Category__c ," Box"),100

Ispickval( Seats_Category__c ,"Class-A"),75

Ispickval(Seats_Category__c," Class_B"),50

Ispickval(Seats_Category__c," Class-C"),25,0

)

Steve MolisYou could also use a CASE function instead of a Nested IF like this =>

CASE(Seats_Catagory__c,"Box",100,

"Class-A",75,

"Class-B",50,

"Class-C",25,

0)

## All Answers

DevADSHey Kishor,

Try this:Select return type as

Numberfor the following formula field:IF(ISPICKVAL( Seats_Category__c, 'Box'),100,IF(ISPICKVAL(Seats_Category__c, 'Class-A'),75,

IF(ISPICKVAL(Seats_Category__c, 'Class-B'),50,

IF(ISPICKVAL(Seats_Category__c,'Class-C'),25,0))))

Happy Coding!!

Ashish_SFDCHi Kishore,

The class-b had an _ underscore - check if it meets the picklist value.

I had tried the below formula, works perfect, try in your environment.

IF (Ispickval(Seats_Catagory__c,"Box"),100,

IF (Ispickval(Seats_Catagory__c,"Class-A"),75,

IF (Ispickval(Seats_Catagory__c,"Class-B"),50,

IF (Ispickval(Seats_Catagory__c,"Class-C"),25,0))))

Regards,

Ashish

kolakishore.salesfo1.3895976580747668E12Thank you Ashish...........Its working man.........
Regards,
Kishore kolakishore.salesfo1.3895976580747668E12Thanks Amit...........Its working Steve MolisYou could also use a CASE function instead of a Nested IF like this =>

CASE(Seats_Catagory__c,"Box",100,

"Class-A",75,

"Class-B",50,

"Class-C",25,

0)

Chandra PrakashHi ,

IF(ISPICKVAL( Seats_Category__c, 'Box'),"100",IF(ISPICKVAL(Seats_Category__c, 'Class-A'),"75",IF(ISPICKVAL(Seats_Category__c, 'Class-B'),"50",IF(ISPICKVAL(Seats_Category__c,'Class-C'),"25","0"))))------------------------------------

Chandra Prakash Sahrma

ImmyI think Steve molis option is better to use for reducing code .Am I write ?? Ashish_SFDCHi Immy,

Thats correct,

Ispickval simplifies the logic but Case is a Good Programming Practice.

Regards,

Ashish