Skip to main content
Hi, I am trying to create a formula field for branches in the purchase orders object. I have been trying to write out in a formula: if the opportunity is blank AND ship to is either external jobsite OR vendor, then use the ship from field as the branch. But, if the opportunity is blank AND ship to is equal to anything else, then use the ship to field. Otherwise, use the opportunity branch field. 

 

The result I am getting, when the opportunity is blank, I will always get the ship to field as my branch. I can get this to work if I take the OR statement out and have only ship to <> External Jobsite. I can do the same vice versa with Vendor too. So, I believe there is something I am not understanding about the OR function. Any help would be appreciated! Thanks

 

IF(ISBLANK(Opportunity__c) && (TEXT(Ship_To__c)  <> 'EXTERNAL JOBSITE'  || TEXT(Ship_To__c)  <>  'VENDOR'),

 

TEXT(Ship_To__c), 

 

IF(ISBLANK(Opportunity__c) && (TEXT(Ship_To__c)  = 'EXTERNAL JOBSITE' || TEXT(Ship_To__c)  = 'VENDOR'), 

 

TEXT(Ship_From__c),Opportunity_Branch__c))
2 Antworten
  1. 21. Feb. 2019, 15:03

    IF(ISBLANK(Opportunity__c),

        IF(TEXT(Ship_To__c)  = 'EXTERNAL JOBSITE'  || TEXT(Ship_To__c)  =  'VENDOR',

            TEXT(Ship_From__c),

        /*ELSE*/

            TEXT(Ship_To__c)

        ),

    /*ELSE*/

        Opportunity_Branch__c

    )

    Try this

0/9000