I use this formula field in my apex code. But I have big troubles with it, because there should be different logic for values
If I choose
Treat blank fields as blanks, I'll get
NULL even if one of the Integer filds (
NOT NULL. If I choose
Treat blank fields as zeroes, my formula field will be
0 too. And this formula is incorrect, because in both variants I get
NULL. And I don't know why.
IF(First__c != NULL && Second__c != NULL, First__c + Second__c , IF(First__c = NULL && Second__c != NULL, Second__c , IF(First__c != NULL && Second__c = NULL, First__c , NULL)))
And if one of fields in
NULL and another one is
0, I want to get
0 in my formula field.
I don't want to change the formula type, because I have a lot of logic with it already. Can I do something with this?