Hi guys, for some reason I cannot wrap my head around the formula syntax, and I could use some help. I understand this is a very easy and should be trivial.
My requirement is that IF SAP Ship-to Account Number
IS NOT Null, Override SAP
Address must be "Yes", and if It is Null it should be "No"` Can anyone help me out with a simple formula? This was my initial logic in which I think I'm going the wrong way with it.
IF(AND(SAP_Ship_to_Account_Number__c = null),ISPICKVAL(Override__c,"Yes"),ISPICKVAL(Override__c, "No"))
Update*
I just realized that SAP Ship-to Account Number is a formula that concatenates 2 other fields. That will complicate things doesn't it.. I am getting the error
Error: Formula result is data type (Text), incompatible with expected data type (true or false)
Attribution to: EricSSH
Possible Suggestion/Solution #1
IF(
AND(
NOT(
ISNULL(SAP_Ship_to_Account_Number__c)
),
ISPICKVAL(Override__c,"Yes")
),
"Yes","No"
)
Attribution to: greenstork
Possible Suggestion/Solution #2
Remove the AND
and use ISBLANK
. Also the 'Override SAP Address with Drop Ship Info' field should be a formula text field (not editable) if its based on the "Ship To Account Number:
IF(ISBLANK(SAP_Ship_to_Account_Number__c),"Yes","No"))
This might not work if you occasionally have to manually override the Override SAP address field
Attribution to: uZiqJp
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31827