+ Start a Discussion
Nicholas Zorrilla 5Nicholas Zorrilla 5 

Process Builder IF statement

I want to update a Picklist based on certain critieria. Here is the statement I wrote in Process Builder, the issue I am having is it won't update the picklist value to 'New' but instead goes to Null. Can anyone help? Thank you in advance.
Formula: 
IF([Partnership__c].Actual_Launch_Date__c < DATE(2019,1,1), 'Base',

    IF([Partnership__c].Actual_Launch_Date__c >= DATE(2019,1,1) && 
       [Partnership__c].Actual_Launch_Date__c <= DATE(2019,12,31) &&
       [Partnership__c].Merchant__c.Integration_Launch_Date__c < DATE(2019,1,1) &&
       [Partnership__c].Publisher__c.Integration_Launch_Date__c < DATE(2019,1,1)
    ,'Growth',
    IF(([Partnership__c].Actual_Launch_Date__c >= DATE(2019,1,1) && 
[Partnership__c].Actual_Launch_Date__c <= DATE(2019,12,31) &&
([Partnership__c].Merchant__c.Integration_Launch_Date__c >= DATE(2019,1,1) ||
[Partnership__c].Publisher__c.Integration_Launch_Date__c >= DATE(2019,1,1)))
|| 
([Partnership__c].Merchant__c.Integration_Launch_Date__c >= DATE(2019,1,1)  && [Partnership__c].Publisher__c.Integration_Launch_Date__c < DATE(2019,1,1)  )
||
([Partnership__c].Publisher__c.Integration_Launch_Date__c >= DATE(2019,1,1)  && [Partnership__c].Merchant__c.Integration_Launch_Date__c < DATE(2019,1,1)  ), 'New', '')
    )
Best Answer chosen by Nicholas Zorrilla 5
Murali MattaMurali Matta
Hi Nicholas,

Please use below code.
 
if([Partnership__c].Actual_Launch_Date__c < DATE(2019,1,1), 'Base',
if(AND([Partnership__c].Actual_Launch_Date__c >= DATE(2019,1,1), [Partnership__c].Actual_Launch_Date__c <= DATE(2019,12,31),
[Partnership__c].Merchant__c.Integration_Launch_Date__c < DATE(2019,1,1),[Partnership__c].Publisher__c.Integration_Launch_Date__c < DATE(2019,1,1)),
'Growth',IF(OR(AND([Partnership__c].Actual_Launch_Date__c >= DATE(2019,1,1),[Partnership__c].Actual_Launch_Date__c <= DATE(2019,12,31),
OR([Partnership__c].Merchant__c.Integration_Launch_Date__c >= DATE(2019,1,1),[Partnership__c].Publisher__c.Integration_Launch_Date__c >= DATE(2019,1,1))),
AND([Partnership__c].Merchant__c.Integration_Launch_Date__c >= DATE(2019,1,1),[Partnership__c].Publisher__c.Integration_Launch_Date__c < DATE(2019,1,1)),
AND([Partnership__c].Publisher__c.Integration_Launch_Date__c >= DATE(2019,1,1),[Partnership__c].Merchant__c.Integration_Launch_Date__c < DATE(2019,1,1))),
'New',''))

Let me know if you have any confusion.

Kindly mark this as solved if the reply was helpful.

Thanks,
Murali

All Answers

Murali MattaMurali Matta
Hi Nicholas,

Please use below code.
 
if([Partnership__c].Actual_Launch_Date__c < DATE(2019,1,1), 'Base',
if(AND([Partnership__c].Actual_Launch_Date__c >= DATE(2019,1,1), [Partnership__c].Actual_Launch_Date__c <= DATE(2019,12,31),
[Partnership__c].Merchant__c.Integration_Launch_Date__c < DATE(2019,1,1),[Partnership__c].Publisher__c.Integration_Launch_Date__c < DATE(2019,1,1)),
'Growth',IF(OR(AND([Partnership__c].Actual_Launch_Date__c >= DATE(2019,1,1),[Partnership__c].Actual_Launch_Date__c <= DATE(2019,12,31),
OR([Partnership__c].Merchant__c.Integration_Launch_Date__c >= DATE(2019,1,1),[Partnership__c].Publisher__c.Integration_Launch_Date__c >= DATE(2019,1,1))),
AND([Partnership__c].Merchant__c.Integration_Launch_Date__c >= DATE(2019,1,1),[Partnership__c].Publisher__c.Integration_Launch_Date__c < DATE(2019,1,1)),
AND([Partnership__c].Publisher__c.Integration_Launch_Date__c >= DATE(2019,1,1),[Partnership__c].Merchant__c.Integration_Launch_Date__c < DATE(2019,1,1))),
'New',''))

Let me know if you have any confusion.

Kindly mark this as solved if the reply was helpful.

Thanks,
Murali
This was selected as the best answer
Nicholas Zorrilla 5Nicholas Zorrilla 5
Thank you for your help, Murali Matta