+ Start a Discussion
SabbasiSabbasi 

Formula - Receiving an error on IsPickVal Formula

I am adding this formula to GST/HST field. I have a picklist (Province_for_tax_calculation) with values ON,BC,NB etc.

I have another field called Amount Payable which needs to be calculated based on the picklist value selected. The formula below is not working. Any ideas?

 

 

IF(
OR(
ISPICKVAL(Province_for_tax_calculation__c, "ON"),
ISPICKVAL(Province_for_tax_calculation__c, "BC"),
ISPICKVAL(Province_for_tax_calculation__c, "NB"),
ISPICKVAL(Province_for_tax_calculation__c, "NS"),
ISPICKVAL(Province_for_tax_calculation__c, "NL"),
ISPICKVAL(Province_for_tax_calculation__c, "PEI"),
ISPICKVAL(Province_for_tax_calculation__c, "QC")),
"Amount_Payable__c *0.13,0",
"Amount_Payable__c *0.12,0",
"Amount_Payable__c *0.13,0",
"Amount_Payable__c *0.15,0",
"Amount_Payable__c *0.13,0",
"Amount_Payable__c *0.14,0",
"Amount_Payable__c *0.149,0"
)

sourav046sourav046
Try this : CASE( Text(Province_for_tax_calculation__c), 'ON', Amount_Payable__c *0.13 , 'BC', Amount_Payable__c *0.12' 'NB', Amount_Payable__c *0.13' 'NS', Amount_Payable__c *0.15, 'NL', Amount_Payable__c *0.13, 'PEI', Amount_Payable__c *0.14, Amount_Payable__c *0.149 ) The last line is for ELSE condition .so you dont put any Picklist value here this will throw an error . I considered Amount_Payable__c is a Currency field though you didnt mention it .If you want to display string value simply put a ' ' in the Amount_Payable__c *0.15 section .
Prady01Prady01
IF(ISPICKVAL(Province_for_tax_calculation__c, "ON"),"Amount_Payable__c *0.13", IF(ISPICKVAL(Province_for_tax_calculation__c, "BC"),"Amount_Payable__c *0.12", IF(ISPICKVAL(Province_for_tax_calculation__c, "NB"),"Amount_Payable__c *0.13", IF(ISPICKVAL(Province_for_tax_calculation__c, "NS"),"Amount_Payable__c *0.15", IF(ISPICKVAL(Province_for_tax_calculation__c, "NL"),"Amount_Payable__c *0.13", IF(ISPICKVAL(Province_for_tax_calculation__c, "PEI"),"Amount_Payable__c *0.14", IF(ISPICKVAL(Province_for_tax_calculation__c, "QC"),"Amount_Payable__c *0.149"),null)))))) Hope it helps, thanks