You need to sign in to do that
Don't have an account?
murdoc
What is this formula supposed to be doing?
Hey all!
I have an old formula in our org and I'm trying to make sure it's doing what I think it's doing? If not we got some 'splaining to do. :) Anyway here's the code:
IF(AND(NOT(ISPICKVAL(Type , "General, Corporate Event, Exposition, Non-Revenue, Sub-Contract, Maritz" )),(RecordTypeId = "0123000000092IT")
&&
TODAY() >= DATE( IF(MONTH(Pipeline_Date__c)=12, YEAR(Pipeline_Date__c )+1, YEAR(Pipeline_Date__c )), IF(MONTH(Pipeline_Date__c)=12,1,MONTH(Pipeline_Date__c)+1), 15)),
Total_Revenue_Actual__c ,
Amount )
Okay, what do you think it's doing? I will speak about you very fondly if you can figure it out. Thanks!
I have an old formula in our org and I'm trying to make sure it's doing what I think it's doing? If not we got some 'splaining to do. :) Anyway here's the code:
IF(AND(NOT(ISPICKVAL(Type , "General, Corporate Event, Exposition, Non-Revenue, Sub-Contract, Maritz" )),(RecordTypeId = "0123000000092IT")
&&
TODAY() >= DATE( IF(MONTH(Pipeline_Date__c)=12, YEAR(Pipeline_Date__c )+1, YEAR(Pipeline_Date__c )), IF(MONTH(Pipeline_Date__c)=12,1,MONTH(Pipeline_Date__c)+1), 15)),
Total_Revenue_Actual__c ,
Amount )
Okay, what do you think it's doing? I will speak about you very fondly if you can figure it out. Thanks!
If{
Type contains (General, Corporate Event, Exposition, Non-Revenue, Sub-Contract, Maritz)
and the record type ID = 0123000000092IT
and Today is greater or equal to the 15th of the month after Pipeline_Date__c,
if all conditions are met returns the value of Total_Revenue_Actual__c,
if not it returns the value of Amount
}
Let me know if you get it.
IF
(
AND(
NOT(
ISPICKVAL(Type , "General, Corporate Event, Exposition, Non-Revenue, Sub-Contract, Maritz" )
),
(RecordTypeId = "0123000000092IT")
&&
TODAY() >= DATE(
IF(
MONTH(Pipeline_Date__c)=12,
YEAR(Pipeline_Date__c )+1,
YEAR(Pipeline_Date__c )
),
IF(
MONTH(Pipeline_Date__c)=12,
1,
MONTH(Pipeline_Date__c)+1
)
,
15)
),
Total_Revenue_Actual__c ,
Amount
)
OUTCOME:
1. Type != "General, Corporate Event, Exposition, Non-Revenue, Sub-Contract, Maritz"
2. RecordTypeId = "0123000000092IT"
3. Assume calculation of some date say, "CalculatedDate".
If Pipeline_Date__c (Eg, 01-12-2015) lies in Decemeber, then CalculatedDate = 15-01-2016 => 15th of next year Jan
If Pipeline_Date__c (Eg, 01-08-2015) doesn't lies in Decemeber(In this case Aug), then CalculatedDate = 15-09-2016 => 15th of next month.
Indirectly this is calculating 15th of next month. below line is simplified one:
TODAY() >= 15th of next month (i.e, TODAY() >= CalculatedDate)
If all above 3 #s met, then formula will hold "Total_Revenue_Actual__c". Otherwise, holds "Amount".
NOTE: #1 is not comparing Type with General, Corporate Event, etc seperately(Means it doesn't work like CONTAINS). "General, Corporate Event, Exposition, Non-Revenue, Sub-Contract, Maritz" is single word here.
*If type is not (General, Corporate Event, Exposition, Non-Revenue, Sub-Contract, Maritz)