If Equal To (v1)
Sometimes you want to only show certain content if something is equal to a certain value when retrieving the data from a system.
In the following example we have a rule that says:
Go through each of the rows in a collection classed as property charges transactions.
IF the type of transaction in the collection is equal to āChargeā then show the text Disabled Band Relief and the amount of the transaction.
{{#each CurrentRevenueAccount.Transactions.PropertyCharges.Items}}
{{if_eq Description 'Disabled'}}
Disabled Band Relief - £{{Amount}}
{{/if_eq}}
{{/each}}
We can see this uses the if_eq option.
In the above example the Civica back-office system only gave the word āDisabledā for the transaction description, which was felt too poor to be clearly understood.
Therefore in this case the conditional content was designed to detect a specific transaction type and replace the label sent by the back office with a better one.
The description from the back office was not what the council wanted and so we checked for any items with the name Disabled and replaced it with the word Disabled Band relief.
Last updated
Was this helpful?