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
Justin Thompson 9Justin Thompson 9 

I'm trying to write a formula but not sure how. If "At Risk" checkbox is checked, then "At Risk Reason" field picklist value should be selected. If "At Risk" checkbox not selected, a value should not be selected in the "At Risk Reason" picklist field

Best Answer chosen by Justin Thompson 9
Maharajan CMaharajan C
Hey Justin, You can't grey out the field only you can throw the validation msg using standard functionalities.
 
AND(
    NOT(ISPICKVAL(At_Risk_Reason__c,"Other")),
	NOT(ISBLANK(Other_Reason_Explanation__c))
)

Thanks,
Maharajan.C

All Answers

Maharajan CMaharajan C
HI Justin,

Are you looking for validation formula? If yes please use the below one: And use your org Field Api name below.
 
AND(
At_Risk__c = TRUE,
ISBLANK(TEXT(At_Risk_Reason__c))
)

Thanks,
Maharajan.C

 
Justin Thompson 9Justin Thompson 9
Yes. Thank you that worked. I'm also looking for a validation formula for the following:
If "At Risk Reason" picklist field value "Other" is not selected, then "Other Reason Explanation" field value should be grayed out (there should not be ability to write anthing in this text field). Thanks!
Maharajan CMaharajan C
Hey Justin, You can't grey out the field only you can throw the validation msg using standard functionalities.
 
AND(
    NOT(ISPICKVAL(At_Risk_Reason__c,"Other")),
	NOT(ISBLANK(Other_Reason_Explanation__c))
)

Thanks,
Maharajan.C
This was selected as the best answer
Justin Thompson 9Justin Thompson 9
Worked!!! Thank you so much! I'm new to validation rules and been spending a lot of time trying to figure this out. Greatly appreciated!
Justin Thompson 9Justin Thompson 9
I've got one more for you. If "At Risk" Checkbox has not been selected, then "At Risk Date" field should contain no value.
Maharajan CMaharajan C
AND(
At_Risk__c = FALSE,
NOT(ISBLANK(At_Risk_Date__c))
)

Thanks,
Maharajan.C
Maharajan CMaharajan C
Please mark the best answer which helped you !!!
Justin Thompson 9Justin Thompson 9
Awesome! Thank you for your help!
keniam brijaniyakeniam brijaniya
MyBK Experience Survey lets the company find out what their customers think about their services, foods, and stores, so they can improve to the next level. MyBK Experience Survey
Denitsa StoychevaDenitsa Stoycheva

Hi, 

I am also new to validation rules and I am trying to create one for Industry picklist. The logic I am going after is the following: 

IF the industry value uploaded / edited on the Account object IS outside the picklist values throw an error, otherwise populate.

It would be amazing if I can get some support on this. Thank you!!!