You need to sign in to do that
Don't have an account?
Aleli Lopez
how to make checkbox required if picklist value is correct
Hi all,
I have this requirement to make checkbox "Required" if the selected picklist value is correct. Let say if my picklist value is "IT", my checkboxes of Java, Javascript should displayed as required.
I have this requirement to make checkbox "Required" if the selected picklist value is correct. Let say if my picklist value is "IT", my checkboxes of Java, Javascript should displayed as required.
try with below validation rule. If this helps,please mark it as best answer
All Answers
We can achive your requiement with Validation reules.
Formula sample,
IF( AND (ISPICKVAL(YourPickList_Field__c , 'IT') , OR( NOT(Java__c), NOT(Javascript__c ) ) ) , else statement with other picklist values ).
Hi Aleli Lopez,
By making a check-box required,do you mean that the check-box has to be checked ,when the picklist value to 'IT'
In that case you can try this,
On an Object you have Checkbox 'java__c' and a Picklist field 'picklistField__c' ,
Under the Checkbox , fields and Relationship Section Click the 'Field Dependencies' button, Click New
In the controlling Field choose java__c and in Dependent field Choose picklistField__c
The page that opens next is very self explanatory so you can follow the instructions and you'll learn that Checkbox can be used in a dependent picklist
OR
You can try the below formula on the checkbox field
If( text(PicklistField__c) =='IT' ,True ,true)
Please Mark It As Best Answer If It Helps.
Thanks,
Jayeshkumar Parmar
try with below validation rule. If this helps,please mark it as best answer
Thank you Md Thameem and Jayeshkumar Parmar for the response.
Here's the complete scenario.
I have 2 types of Record : Standard and IT.
Now, when I select Standard, my picklist should display "FIN", "HR", "RO", and "WR". Then I select IT, my picklist shoudl display "IT" and "MISC" only.
When I select IT, my checkboxes (APEX, C#, Java, and Javascript) should be displayed and checked.
From Jayeshkumar response, this shows that checkbox should checked first before I select from picklist.
What I need to do is to select record type, select picklist. If I select Standard record type, checkboxes should not be displayed but when I select IT, checkboxes should be checked and displayed.
I hope this make my scenario more clearer. Thanks.
For this type of requirement you need to overwrite the standard detail page with custom visualforce page, where you can show/hide the field on custom logic in script.
Please refer to the below link exactly with similar issue.
Kindly modify the code as per your requirement which helps you surpass the above challenge.
RecordType based rendering in Visual Force Page (https://salesforce.stackexchange.com/questions/96188/recordtype-based-rendering-in-visual-force-page/96210)
How to hide/show the fields based on Picklist value (https://salesforce.stackexchange.com/questions/101208/how-to-hide-show-the-fields-based-on-picklist-value)
If this helps,please mark it as best answer.
Thanks,
Jayeshkumar Parmar