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

  • Protip: you can always replace IF(condition, true, false) with simply condition. – Adrian Larson Jan 6 '17 at 2:42
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)}"
  • 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 – user5129806 Jan 6 '17 at 2:15
  • 1
    @user5129806 Not sure what to tell you. There might be going on than just this simple rendered statement. – sfdcfox Jan 6 '17 at 2:18
0

Your rendered will look like this:

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

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.