
i need to give two conditions in one of my formula field.
condition 1:
IF( $Profile.Name == 'Marketing profile' ,
$Label.Opportunity_Shadow_URL+Opportunity__r.Id,$Label.Opportunity_Shadow_URL+Id)
Condition 2:
IF( $Profile.Name == 'Capgemini Sales profile' ,
$Label.Opportunity_Shadow_URL+Id,$Label.Opportunity_Shadow_URL+Opportunity__r.Id)
)
how to combine these two conditions in one formula field.
I have tried to do like,
IF( $Profile.Name == 'Capgemini Marketing profile' ,
$Label.Opportunity_Shadow_URL+Opportunity__r.Id,IF( $Profile.Name == 'Capgemini Sales profile' ,
$Label.Opportunity_Shadow_URL+Id,$Label.Opportunity_Shadow_URL+Opportunity__r.Id)
),,$Label.Opportunity_Shadow_URL+Id))
But am getting error like Error: Invalid Data. Review all error messages below to correct your data.Syntax error. Extra ',' (Related field: Formula)
please help me what is the problem in that.
2 个回答
Could you try IF( ($Profile.Name == 'Marketing profile' || $Profile.Name == 'Capgemini Sales profile'),
$Label.Opportunity_Shadow_URL+Opportunity__r.Id,$Label.Opportunity_Shadow_URL+Id)
The || operator refers to the OR function so it should work if either of those are true.