1

Good Afternoon All,

I need some help with a formula.

Aim – Create a text formula which returns either the Lead company name or the contact company name based on criteria.

Criteria – If the lead isn’t converted then return the lead company name; if the lead is converted then return the contact account name.

Fields to use are ;

BrightTALK__Lead__r.Company BrightTALK__Contact__r.Account.Name IsConverted

Really hoping you lovely people can help

Looking forward to your response

2
  • What formulas have you tried and what were the issues you ran into?
    – Jenny B
    Commented Jul 2, 2015 at 15:44
  • I tried the following formula, but that returns either lead company name or the contact account name. I havent however included any if statements and this is where i am struggling BrightTALK__Lead__r.Company+ " " +BrightTALK__Contact__r.Account.Name
    – D Mason
    Commented Jul 2, 2015 at 15:50

1 Answer 1

0

IsConverted is a checkbox field values will be true or false, so you should be able to write it like this:

IF(IsConverted, BrightTALK__Contact__r.Account.Name, BrightTALK__Lead__r.Company)

Try this: BLANKVALUE(BrightTALK__Contact__r.Account.Name, BrightTALK__Lead__r.Company)

Based on comments try a combination:

IF(IsConverted, BLANKVALUE(BrightTALK__Contact__r.Account.Name, BrightTALK__Lead__r.Company), BrightTALK__Lead__r.Company)

Looks like this last formula will work:

IF(ISBLANK( BrightTALK__Lead__c) || BrightTALK__Lead__r.IsConverted, BrightTALK__Contact__r.Account.Name,BrightTALK__Lead__r.Company)

BLANKVALUE Determines if an expression has a value and returns a substitute expression if it does not. If the expression has a value, returns the value of the expression.

17
  • Hi Jenny B , Thanks for your response, however its only returning Lead company name. If this was an excel formula it would be something along the lines of =IF(ISBLANK(B2),A2,B2)
    – D Mason
    Commented Jul 2, 2015 at 16:20
  • @DMason updated with another option.
    – Jenny B
    Commented Jul 2, 2015 at 16:22
  • HI Jenny, that works but what happens when you convert a lead ? Which name does it take ? for eg is it the lead company name or the account.name ?
    – D Mason
    Commented Jul 2, 2015 at 16:23
  • @DMason it will always use the first field when it's not blank, when it is blank it will use the second value.
    – Jenny B
    Commented Jul 2, 2015 at 16:24
  • 1
    No worries, tweeted you aswell :) thank you Jenny.
    – D Mason
    Commented Jul 3, 2015 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .