If Equal To (v1)

if_eq

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.

You can use if_eq to reword data from the back office if it is jargon filled/not conducive to being easily understood

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?