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
ThunderBoltThunderBolt 

How to use AND/OR conditions in <apex:outputpanel render={}>

Code I wrote:
apex:outputPanel rendered="{
        !OR(
            AND(
                Preferred_Language__c == 'English',
                Case_Category__c != 'Bug'
            ),
            AND(
                Case_Category__c == 'Administration',
                OR(
                    Case_Sub_Category__c == 'Admin',
                    Case_Sub_Category__c == 'New User',
                    Case_Sub_Category__c == 'Password Reset',
                    Case_Sub_Category__c == 'Other'
                )
            )
    )}"> </apex:outputPanel>

But this is not working. Please Suggest
 
Best Answer chosen by ThunderBolt
Suraj Tripathi 47Suraj Tripathi 47

Hi Rakesh,
you have to put these conditions inside if block use below code.

apex:outputPanel rendered="{
        !IF(OR(
            AND(
                Preferred_Language__c == 'English',
                Case_Category__c != 'Bug'
            ),
            AND(
                Case_Category__c == 'Administration',
                OR(
                    Case_Sub_Category__c == 'Admin',
                    Case_Sub_Category__c == 'New User',
                    Case_Sub_Category__c == 'Password Reset',
                    Case_Sub_Category__c == 'Other'
                )
            )
    ),true,false)}"> </apex:outputPanel>

If you find your Solution then mark this as the best answer.
  
Thank you!
Regards,
Suraj Tripathi