You need to sign in to do that
Don't have an account?
jimmy2511
IF Forumula clarification for a new field
Hey Everyone
I am working on a IF formula for a new field.
The formula is as follows:
OR( IF( ISPICKVAL( Type_of_Redemption__c, "Credit Note V" ), Total_Vouchers_Redeemed__c * Contract_Deal_Attribute__r.Groupon_Price__c * Contract_Deal_Attribute__r.Commission__c * Contract_Deal_Attribute__r.VAT__c , 0 ), IF( ISPICKVAL( Type_of_Redemption__c, "Credit Note C" ), Contract_Deal_Attribute__r.Groupon_Price__c * ( 1 + Contract_Deal_Attribute__r.VAT__c ) * Commission_under_Credit_Note__c - Contract_Deal_Attribute__r.Commission__c * Total_Vouchers_Redeemed__c ) , 0 )
However, I am recieving a Syntax error as there is no false statement, it expected 3 and received 2.
Any suggestions would be most warmly recieved.
Thank you.
Jimmy
Hi,
Try the below formula :
IF(ISPICKVAL( Type_of_Redemption__c, "Credit Note V" ), Total_Vouchers_Redeemed__c * Contract_Deal_Attribute__r.Groupon_Price__c *
Contract_Deal_Attribute__r.Commission__c * Contract_Deal_Attribute__r.VAT__c,
IF( ISPICKVAL( Type_of_Redemption__c, "Credit Note C" ),Contract_Deal_Attribute__r.Groupon_Price__c * ( 1 + Contract_Deal_Attribute__r.VAT__c )
* Commission_under_Credit_Note__c - Contract_Deal_Attribute__r.Commission__c * Total_Vouchers_Redeemed__c ,0))
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hey,
Thank you for the response. The syntax is working but I am getting the Error message:
Error: Compiled formula is too big to execute (9,449 characters). Maximum size is 5,000 characters
Can you advise?
Cheers
Jimmy
hi ,
formula field 1 = IF(ISPICKVAL( Type_of_Redemption__c, "Credit Note V" ), Total_Vouchers_Redeemed__c * Contract_Deal_Attribute__r.Groupon_Price__c *
Contract_Deal_Attribute__r.Commission__c * Contract_Deal_Attribute__r.VAT__c, 0)
formula field 2 = IF( ISPICKVAL( Type_of_Redemption__c, "Credit Note C" ),Contract_Deal_Attribute__r.Groupon_Price__c * ( 1 + Contract_Deal_Attribute__r.VAT__c )
* Commission_under_Credit_Note__c - Contract_Deal_Attribute__r.Commission__c * Total_Vouchers_Redeemed__c ,0))
formula field 3 = IF(OR (formula field 1,formula field 2), true , false)
formula field will contain the corresponding value.