• Perceptium
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

 I'm trying to compare values of two picklists to get the right value

 

For example if the cruise type is 'Half Day' and the Reseller is 'INP' the value is $16

 

I am using the following..... (excerpt only)

 

IF(ISPICKVAL(RID__c,"Direct"),(Price_Quoted__c/1.2),
IF ((ISPICKVAL(RID__c,"Acorne")&&(ISPICKVAL(ET__c,"Half Day"))),16,
IF ((ISPICKVAL(RID__c,"Activity Gift/Maximise")&&(ISPICKVAL(ET__c,"Half Day"))),15,
IF ((ISPICKVAL(RID__c,"Activity Gift/Maximise")&&(ISPICKVAL(ET__c,"High Speed"))),20,
IF ((ISPICKVAL(RID__c,"Attraction World")&&(ISPICKVAL(ET__c,"Half Day"))),18,
IF ((ISPICKVAL(RID__c,"Buy a Gift")&&(ISPICKVAL(ET__c,"Half Day"))),12,
IF ((ISPICKVAL(RID__c,"Buy a Gift")&&(ISPICKVAL(ET__c,"Half Day for 2"))),6,
IF ((ISPICKVAL(RID__c,"Buy a Gift")&&(ISPICKVAL(ET__c,"High Speed"))), 7,

etc,etc

 

 

The formula works but there are so many picklist values that it is too big when it compiles

 

I'm trying to find a more effecient way of writing it so that it will compile and have tried 

 

IF (ISPICKVAL (ET__c,"Half Day"),CASE(RID__c,"Acorne",1,"Direct",2,0),
IF ((ISPICKVAL(ET__c, "High Speed"),CASE ((RID__c,"Acorne",1,"Direct",2,0))))

etc...

 

and also

 

CASE(ET__c,"Half Day", CASE(RID__c, "Acorne", 1, "Direct", 2, 0), "High Speed", CASE (RID__c, "Acorne", 5, "Direct", 10, 0)

 

but can't get the syntax right to make them work

 

Any suggestions?

 I'm trying to compare values of two picklists to get the right value

 

For example if the cruise type is 'Half Day' and the Reseller is 'INP' the value is $16

 

I am using the following..... (excerpt only)

 

IF(ISPICKVAL(RID__c,"Direct"),(Price_Quoted__c/1.2),
IF ((ISPICKVAL(RID__c,"Acorne")&&(ISPICKVAL(ET__c,"Half Day"))),16,
IF ((ISPICKVAL(RID__c,"Activity Gift/Maximise")&&(ISPICKVAL(ET__c,"Half Day"))),15,
IF ((ISPICKVAL(RID__c,"Activity Gift/Maximise")&&(ISPICKVAL(ET__c,"High Speed"))),20,
IF ((ISPICKVAL(RID__c,"Attraction World")&&(ISPICKVAL(ET__c,"Half Day"))),18,
IF ((ISPICKVAL(RID__c,"Buy a Gift")&&(ISPICKVAL(ET__c,"Half Day"))),12,
IF ((ISPICKVAL(RID__c,"Buy a Gift")&&(ISPICKVAL(ET__c,"Half Day for 2"))),6,
IF ((ISPICKVAL(RID__c,"Buy a Gift")&&(ISPICKVAL(ET__c,"High Speed"))), 7,

etc,etc

 

 

The formula works but there are so many picklist values that it is too big when it compiles

 

I'm trying to find a more effecient way of writing it so that it will compile and have tried 

 

IF (ISPICKVAL (ET__c,"Half Day"),CASE(RID__c,"Acorne",1,"Direct",2,0),
IF ((ISPICKVAL(ET__c, "High Speed"),CASE ((RID__c,"Acorne",1,"Direct",2,0))))

etc...

 

and also

 

CASE(ET__c,"Half Day", CASE(RID__c, "Acorne", 1, "Direct", 2, 0), "High Speed", CASE (RID__c, "Acorne", 5, "Direct", 10, 0)

 

but can't get the syntax right to make them work

 

Any suggestions?