function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lil_rangerlil_ranger 

Update Field Value

Is it possible to create a formula for a field update to look at 2 different lookup fields and depending on which one is selected to populate a specfic text field?

 

Example: Product Owned (lookup) is blank but Asset (lookup) is not and pull in the product name text field based off of the selection.

 

IF(OR(
NOT(ISBLANK(Product_Owned__c)),Product_Owned__r.ProductName__c,
IF(
NOT(ISBLANK(Asset__c)),Asset__r.ProductName__c )))

 

Any info would be greatly appreciated.

Best Answer chosen by Admin (Salesforce Developers) 
Richie DRichie D

Hi,

 

Does this do what you need?

 

IF(
NOT(ISBLANK(Product_Owned__c)),Product_Owned__r.ProductName__c,
IF(
NOT(ISBLANK(Asset__c)),Asset__r.ProductName__c ,NULL))

This looks right although not tried it...

R.

 

 

All Answers

Richie DRichie D

Hi,

 

Does this do what you need?

 

IF(
NOT(ISBLANK(Product_Owned__c)),Product_Owned__r.ProductName__c,
IF(
NOT(ISBLANK(Asset__c)),Asset__r.ProductName__c ,NULL))

This looks right although not tried it...

R.

 

 

This was selected as the best answer
lil_rangerlil_ranger

It worked!  Thank you very much.