Help with string template and expressions

Hi there,
quick question can I combine an expression with a string template:

for example I want to check that number and produce different strings.

You can use the {{evalExpression}} format helper -

However, for this particular case, it would be much easier to just use the {{#eq}} block helper -

1 Like

Ah makes sense, is there a way to create a switch statement with multiple conditions or you suggest to use something like a lookup approach when dealing with multiple eq statements?

There’s no way to do a switch statement, sorry; you’ll have to do an if ... else if ... else if ... else type statement like so:

{{#eq val 50}}first{{else eq val 30}}second{{else}}default{{/eq}}

1 Like