Can we get the parent field value by comparision in the formula field?
a object has two parents.
we need to get that two parent value in formula field but the
condition is. need to check the first parent, whether the value is null or not, if null get the second parent field value.
object names:
ob1
lookup fields:
ob2 (field name is descrip)
ob3 (field name is descrip)
i have tried liek below:
if( ob1_r.desc != null, value, obj_2.descrip);
above is right?
Best Answer
From your question I understand you require a formula field which will be populated based on the field named 'desc' present in both the parents. Also it should check if the field 'desc' is empty before using it.
The above formula will check if Parent1__c object's Desc1__c field is blank or not. If blank then Parent2__c object's Desc2__c will be populated in the child object else Parent1__c object's Desc1__c will be populated.
I hope this helps.