Helper function pure results in Conditional expressions

Please allow us to use the pure results of a helper function in a Conditional expression.

For example, #includes. This helper function necessarily determines a boolean value. Let me just use that value, such that the entire expression in the conditional node looks like
{{#includes path.to.collection path.to.context.value}}

If I try this exact thing, or the related
{{#includes path.to.collection path.to.context.value}}true{{else}}false{{/includes}},
I get errors.

In the meantime, I’m stuck with
{{path.to.context.value}} === "constant1" || {{path.to.context.value}} === "constant2" ...
It’s very annoying.

Hey @Travis_Rhoden,

As you’ve identified, block helpers are not supported within expressions. My recommendation is to place a Mutate Node above the Conditional Node that runs the block helper (#includes) and adds the resulting boolean to the payload. You can then check the boolean value with the Conditional Node. Make sure to check the “Treat Value as JSON” checkbox so that you get an actual boolean on the payload rather than the string “true” or “false”.

My apologies if I miscommunicated. I have resolved my issue. This post is a request for a feature to make future similar situations less awkward in the workflow.

Making an inline version of the #includes block helper is a good feature request. Instead of a block helper, it would just output the string “true” or “false”. Then it could be used in the conditional node. I have filed the feature request.