0

I have below following rendered attribute

<apex:outputLabel rendered="{!IF(AND(LastCreditCheck == '', acctObj.Decline_Credit_Check__c== false),true,false)}" />

Above has to be true when acctObj.decline_Credit_Check__c is false and LastCreditCheck value is blank. Last CreditCheck values is given below as

<td >{!EquifaxRiskGrade}</td> 

and acctObj.decline_Credit_Check__c is an account object field. It gives me syntax error in render attribute. Any help on this? Thanks

1
  • Protip: you can always replace IF(condition, true, false) with simply condition.
    – Adrian Larson
    Commented Jan 6, 2017 at 2:42

2 Answers 2

1

Fields are not generally an empty string (""), but instead are null. Regardless, if you're not sure, just use ISBLANK. Also, no need to go with the IF statement, you're just bloating your view state for no good reason.

rendered="{!ISBLANK(LastCreditCheck) && NOT(acctObj.Decline_Credit_Check__c)}"
2
  • Somehow it is not working. If i onkly use lastcredit check field it works. Somehow it is not checking the value of the checkbox it seems Commented Jan 6, 2017 at 2:15
  • 1
    @user5129806 Not sure what to tell you. There might be going on than just this simple rendered statement.
    – sfdcfox
    Commented Jan 6, 2017 at 2:18
0

Your rendered will look like this:

<apex:outputLabel 
rendered="{!(LastCreditCheck == '' && !acctObj.Decline_Credit_Check__c)}" />

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .