Switch Workflow Notification template if Digest
Scenario:
We want to change the content of a Notification, if the notification contains only 1 event (to support pluralisation)
Problem:
The following expression is always true, even if there is only 1 event:
We tried also to change the expression to a greater then expression using the step.total_count, but this is not supported on your side. Any idea how we can implement this?
7 Replies
We have a handlebar helper for pluralization
like this: {{pluralize dog_count "dog" "dogs"}}
You could also use {{#equals step.total_count 1}} .. {{else}}..{{/equals}}
@sebastiankuesters let us know if that works for you 🤩
This works fine, better then the if-statement 🚀
Also interesting Insight, thanks
to be honest I think any helpers and general handlebars syntax should be documented in docs
@unicodeveloper @sumitsaurabh927 I believe there is something in the works
Yes. @sumitsaurabh927 is starting work on that next week.
Perfect. Feel free to reach out if you need anything @sumitsaurabh927
Will do, thanks Gali