+ Start a Discussion
Baguiar2Baguiar2 

Rendering with criteria using "and"

I know it must me a syntax issue , but why my "and" on the rendered is not working ?

 

Thanks!

 

<apex:page standardController="Opportunity" rendered="{!Opportunity.Split_OK__c == True} && {!Opportunity.Split_count__c = 0}" >
 <script language = "JavaScript">

alert ('You have checked the SPLIT box. Please create a record for the Split and specify the percentage of the Split');

 </script>
</apex:page>

 

Best Answer chosen by Admin (Salesforce Developers) 
craigmhcraigmh

You have to use merge field syntax.

 

rendered="{!and(Oportunity.Split_OK__c, !(Opportunity.Split_count__c = 0))}"

All Answers

bprakashbprakash

i had same issue

craigmhcraigmh

You have to use merge field syntax.

 

rendered="{!and(Oportunity.Split_OK__c, !(Opportunity.Split_count__c = 0))}"

This was selected as the best answer
Baguiar2Baguiar2

Thanks! Just one slight typo on the solution but thats what I needed.

 

should be like this:

 

rendered="{!and((Opportunity.Split_OK__c == True),(Opportunity.Split_count__c = 0))}"