Show text based on condition return from script function



  • I am retrieving some data and showing it in a report. The report data has an "active" column the data type is boolean. I would like to show data only when "active" is false. Is it possible to use an "if" and I'm just not finding the correct syntax?

    <td>
    {{#if {{active}} }}
    {{else}}
    INACTIVE TEXT
    {{/if}}
    </td>



  • remove the {{ }} arround the active, they are not needed ;)
    this is handlebars related, on this matter just look here:
    http://handlebarsjs.com/
    It will make your life much easier :D!


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.