You need to sign in to do that
Don't have an account?
@GM
How to put condition in table row for Visualforce Template
I have to display this tr only when there is a value in EOL_Info__c field in VF TEmplate
but for the following code i'm getting sytax error and if i remove (!) before IF then it will get save but wont work.
<tr style="display: {!IF((ISBLANK({!relatedTo.PRM_EOL_Info__c})), 'none', 'table-row')};">
<td>EOL Info:</td>
<td>{!relatedTo.EOL_Info__c}</td>
</tr>
Please suggest some solution
Thanks in advance
Regards,
GM
but for the following code i'm getting sytax error and if i remove (!) before IF then it will get save but wont work.
<tr style="display: {!IF((ISBLANK({!relatedTo.PRM_EOL_Info__c})), 'none', 'table-row')};">
<td>EOL Info:</td>
<td>{!relatedTo.EOL_Info__c}</td>
</tr>
Please suggest some solution
Thanks in advance
Regards,
GM
Please try with below code, I have removed the expressions around relatedTo.PRM_EOL_Info__c field. That is not needed if you have already started the expression.
<tr style="display: {!IF((ISBLANK(relatedTo.PRM_EOL_Info__c)), 'none', 'table-row')};">
<td>EOL Info:</td>
<td>{!relatedTo.EOL_Info__c}</td>
</tr>
Regards,
Vivek Patel
Please mark this best answer if it solves you problem.
All Answers
Please try with below code, I have removed the expressions around relatedTo.PRM_EOL_Info__c field. That is not needed if you have already started the expression.
<tr style="display: {!IF((ISBLANK(relatedTo.PRM_EOL_Info__c)), 'none', 'table-row')};">
<td>EOL Info:</td>
<td>{!relatedTo.EOL_Info__c}</td>
</tr>
Regards,
Vivek Patel
Please mark this best answer if it solves you problem.
Thanks.
Regards,
GM