You need to sign in to do that
Don't have an account?
Nidhi Shukla
How to use if else on formula field
Hi
I am writing this formula field but I don't see Else option. How can I complete this? Completion requirement is else 'Undergraduate', "UGA"
IF(TGTX_Counselor_Assignment_Override__c, NULL,
IF( Record_Share_CCAS__c || Record_Share_CPS__c || Record_Share_ESIA__c || Record_Share_GSEHD__c || Record_Share_GWSPH__c || Record_Share_ONDS__c || Record_Share_SEAS__c || Record_Share_SMHS__c || Record_Share_SOB__c || Record_Share_SON__c || TEXT(TargetX_SRMb__Level__c) = 'Graduate',"GRAD",
I am writing this formula field but I don't see Else option. How can I complete this? Completion requirement is else 'Undergraduate', "UGA"
IF(TGTX_Counselor_Assignment_Override__c, NULL,
IF( Record_Share_CCAS__c || Record_Share_CPS__c || Record_Share_ESIA__c || Record_Share_GSEHD__c || Record_Share_GWSPH__c || Record_Share_ONDS__c || Record_Share_SEAS__c || Record_Share_SMHS__c || Record_Share_SOB__c || Record_Share_SON__c || TEXT(TargetX_SRMb__Level__c) = 'Graduate',"GRAD",
2nd if is inside the else part of first if.
Above works like this:
if(TGTX_Counselor_Assignment_Override__c)
{
output = null;
}
else if(condition1 || condition2 || ... || conditionN)
{
output = "GRAD";
}
else
{
output = "UGA";
}
IF(logical_test, value_if_true, value_if_false)
Checks whether a condition is true, and returns one value if TRUE and another value if FALSE.
Let's say, if probability is > 50, we want to set the formula field value as green. If less or equal, yellow.
You can do:
IF(Opportunity.Probability > 0.5 , "green", "yellow")
which is nothing but:
if(Opportunity.Probability > 0.5)
{
value = "green";
}
else
{
value = "yellow";
}