You need to sign in to do that
Don't have an account?
Formula field in child using ISPICKVAL
Hi,
I have a field Primary Phone which is a picklist. I have phone 1, phone 2,3,4 in master object. I should update a field in child such that if Primary Phone is selected as phone 1, value should be prepopulated in child's field, if selected t phone 2, value in child object's field is phone 2 and so on.
I have tried the following and there were no errors and save was successful. But primary phone field(which is child field) is not getting any value.
------- Using IF -----------
IF(ISPICKVAL( Household_Name__r.Primary_Phone_Identifier__c,"Phone 1" ),Household_Name__r.Phone,
IF(ISPICKVAL( Household_Name__r.Primary_Phone_Identifier__c,"Phone 2" ),Household_Name__r.Phone_2__c,
IF(ISPICKVAL( Household_Name__r.Primary_Phone_Identifier__c,"Phone 3" ),Household_Name__r.Phone_3__c,
IF(ISPICKVAL( Household_Name__r.Primary_Phone_Identifier__c,"Phone 4" ),Household_Name__r.Phone_4__c,NULL)))
)
-------------------------------------------
------------- Using Case ---------------------------
CASE(ISPICKVAL( Household_Name__r.Primary_Phone_Identifier__c,"Phone 1" ) , Phone 1, Household_Name__r.Phone ,
ISPICKVAL( Household_Name__r.Primary_Phone_Identifier__c,"Phone 2" ) , Phone 2, Household_Name__r.Phone_2__c ,
ISPICKVAL( Household_Name__r.Primary_Phone_Identifier__c,"Phone 3" ) , Phone 3, Household_Name__r.Phone_3__c ,
ISPICKVAL( Household_Name__r.Primary_Phone_Identifier__c,"Phone 4" ) , Phone 4, Household_Name__r.Phone_4__c ,
NULL)
-------------------------------------------------------------------
Help me with IF condition. Is it valid to write a ISPICKVAL on parent's field in child object's field?
Any help will be appreciated.
Hello Dorababu,
Syntax of the formula is correct and there is no constraint like 'ISPICKVAL can not be used on parent's field in child object's field'. I would suggest you to setup debug logs (Setup|Administration Setup|Monitoring|Debug logs) and check if you are getting any errors.