+ Start a Discussion
boylesboyles 

Can you keep a current value in the "else" portion of an IF statement?

My Goal is to insert the Account Site Address in the Contact Site Address field when appropriate, otherwise leave the current value (which could either have data or not).

 

I would like to avoid Apex coding and am trying to use an IF statement in a workflow but don't know how to keep the current value in the "value_if_false" portion of the formula.  Is this possible in the Salesforce "IF" formula or are there alternative methods?

 

Any help/suggestions are appreciated!

Best Answer chosen by Admin (Salesforce Developers) 
Steve MolisSteve Molis

Why not just have the WFR evaluate the checkbox field and then either update field, or leave it untouched?

All Answers

Steve MolisSteve Molis

Can you post your WFR formula?

boylesboyles

Hi, here is the formula but I want to replace the "NULL" with <keep existing value>

IF(Address_same_as_Account_Site_Address__c = TRUE,  Account.ShippingCity, "NULL").

 

Excel allows this by not enforcing the "value_if_false" expression which is what I'm trying to emulate (see "Additional Features" section in this tutorial: http://www.ehow.com/way_5282639_excel-statement-tutorial.html).

 

Thanks for your help.

Steve MolisSteve Molis

Is that the formula your WFR Field update?  or the WFR Trigger? 

boylesboyles

The workflow rule is set up as follows:

Evaluation Criteria: Every time a record is created or edited

Rule Criteria: Contact Owner not NULL

 

Field Update Formula is:

IF( Address_same_as_Account_Site_Address__c = TRUE,  Account.ShippingCity, "NULL")

Steve MolisSteve Molis

Why not just have the WFR evaluate the checkbox field and then either update field, or leave it untouched?

This was selected as the best answer
boylesboyles

Thanks!