6

So I need to use an inline if statement in my visualforce page to decide whether or not I need to render an outputText. However I keep hitting a syntax error so I am hoping someone here will catch my (hopefully obvious) mistake.

So there is a field in my custom object that I want to print IF it is populated and not the Id of the contact page I am on. I am also iterating through a list of these objects. So here is what I wrote for an if statement

"{!IF({!relation.First_Contact__c} != null && {!relation.First_Contact__c} != contact.Id), true, false)"

again this is going in the rendered tag of an outputText so the returns are true or false. Also relation is the current custom object from the apex:repeat. Any help is MUCH appreciated.

12
"{!IF(AND(relation.First_Contact__c != null, relation.First_Contact__c != contact.Id), true, false)}"
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.