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
Erika TomatoreErika Tomatore 

AND/OR Formula to Give a Status

I have three different fields representing 3 different things. All can be TRUE, None can be TRUE or only some cane be True.

For instance, I have a picklist for an Account type: Associate, Affiliate, Participants. An Account can be Any ONE of these, or none of these.

I have a checkbox indicating if they are a Licensing Org and another checkbox indicating if they are a Sponosring Org.

An Account can be BOTH a Licensing Org AND a Sponosring Org, but not be an Associate or an Affiliate or a Participant. Or they can be a Licensing Org, but not a Sponosring Org And an Associate, Or they can just be an Associate and not a Licensing Org or a Sponsoring Org. etc.

My initial formula was just looking at my picklist values, but now a wrench was thrown and I somehow need to Account for the other two Checkbox fields.

Any idea how I can do this with a formula?

This was my formula field when I was just looking at the one picklist field. 

CASE(Account.TCH_Membership_Type__c,
"Affiliate Member","Your Company is an Affiliate",
"Associate Member","Your Company is an Associate",
"Participating Member", "Your Company is a Participant",
"", "Your Company is currently not active",
NULL)

Best Answer chosen by Erika Tomatore
Rajiv KocherlaRajiv Kocherla
Hi Erika, 
               
"An Account can be BOTH a Licensing Org AND a Sponosring Org, but not be an Associate or an Affiliate or a Participant. Or they can be a Licensing Org, but not a Sponosring Org And an Associate, Or they can just be an Associate and not a Licensing Org or a Sponsoring Org. etc."

Based on what you said your requirement needs a validation rule not a formula field because you need to validate your data so it is entered properly, you don't want to automate something which a formula field does.
Step 1: I created a Picklist field named Account Type with values "Associate", "Affiliate", "Participants".
Step 2: I created two checkbox fields named Licensing Org and Sponsorship org (make sure when creating the checkbox fields the default values for them are unchecked).
Note: You can ignore Step 1 and Step 2 if you already have fields created. 
Step 3:  When you have three requirements as per what you mentioned in most cases you need three validation rules but in your case you need just two because for your first and second requirement one validation rules solve both. 
Step 4: Requirement 1: An Account can be BOTH a Licensing Org AND a Sponosring Org, but not be an Associate or an Affiliate or a Participant
Step 5: Requiement 2: they can be a Licensing Org, but not a Sponosring Org And an Associate


One Validation Rules enough for both Step 4 and Step 5: AND((ISPICKVAL( Account_Type__c , "Associate") || ISPICKVAL( Account_Type__c , "Participants") || ISPICKVAL( Account_Type__c , "Affiliate")), Licensing_Org__c == true && Sponsoring_Org__c == true)      
Step 6:  
they can just be an Associate and not a Licensing Org or a Sponsoring Org
Validation Rule for Step 6: AND(ISPICKVAL( Account_Type__c , "Associate") , Licensing_Org__c == true) || AND( ISPICKVAL( Account_Type__c , "Associate") , Sponsoring_Org__c == true)
                                         

Note: Validation Rules are formulas too, we call validation rule because we are using formulas to validate your data.
If this solves your question please mark it as best answer.

All Answers

Rajiv KocherlaRajiv Kocherla
Hi Erika, 
               
"An Account can be BOTH a Licensing Org AND a Sponosring Org, but not be an Associate or an Affiliate or a Participant. Or they can be a Licensing Org, but not a Sponosring Org And an Associate, Or they can just be an Associate and not a Licensing Org or a Sponsoring Org. etc."

Based on what you said your requirement needs a validation rule not a formula field because you need to validate your data so it is entered properly, you don't want to automate something which a formula field does.
Step 1: I created a Picklist field named Account Type with values "Associate", "Affiliate", "Participants".
Step 2: I created two checkbox fields named Licensing Org and Sponsorship org (make sure when creating the checkbox fields the default values for them are unchecked).
Note: You can ignore Step 1 and Step 2 if you already have fields created. 
Step 3:  When you have three requirements as per what you mentioned in most cases you need three validation rules but in your case you need just two because for your first and second requirement one validation rules solve both. 
Step 4: Requirement 1: An Account can be BOTH a Licensing Org AND a Sponosring Org, but not be an Associate or an Affiliate or a Participant
Step 5: Requiement 2: they can be a Licensing Org, but not a Sponosring Org And an Associate


One Validation Rules enough for both Step 4 and Step 5: AND((ISPICKVAL( Account_Type__c , "Associate") || ISPICKVAL( Account_Type__c , "Participants") || ISPICKVAL( Account_Type__c , "Affiliate")), Licensing_Org__c == true && Sponsoring_Org__c == true)      
Step 6:  
they can just be an Associate and not a Licensing Org or a Sponsoring Org
Validation Rule for Step 6: AND(ISPICKVAL( Account_Type__c , "Associate") , Licensing_Org__c == true) || AND( ISPICKVAL( Account_Type__c , "Associate") , Sponsoring_Org__c == true)
                                         

Note: Validation Rules are formulas too, we call validation rule because we are using formulas to validate your data.
If this solves your question please mark it as best answer.
This was selected as the best answer
RituSharmaRituSharma
You may use below formula:

if(EndDate>Today(),EndDate-Today(),0)
Afton HomenickAfton Homenick
Hii RituSharma,
Thanks for the update and quick reply. I'll be sure to keep an eye on this thread.This works really well for us https://www.myccpay.ltd/
sinu kumaarsinu kumaar
Visit this site for Govenment Services and Sarkari Yojana Updates-https://www.rojgardunia.com/paymanager/