# Helper function pure results in Conditional expressions

**URL:** https://forums.losant.com/t/helper-function-pure-results-in-conditional-expressions/5664
**Category:** Feature Request
**Created:** [October 29, 2024, 5:53pm UTC](https://forums.losant.com/t/helper-function-pure-results-in-conditional-expressions/5664 "2024-10-29T17:53:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Travis\_Rhoden](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@Travis\_Rhoden](https://forums.losant.com/u/Travis_Rhoden)
#### Post date: [October 29, 2024, 5:53pm UTC](https://forums.losant.com/t/helper-function-pure-results-in-conditional-expressions/5664/1 "2024-10-29T17:53:24Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)
#### Post date: [October 29, 2024, 6:05pm UTC](https://forums.losant.com/t/helper-function-pure-results-in-conditional-expressions/5664/2 "2024-10-29T18:05:45Z")

</div>

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”.

---

<div class="post-metadata">

### Author: ![Travis\_Rhoden](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@Travis\_Rhoden](https://forums.losant.com/u/Travis_Rhoden)
#### Post date: [October 29, 2024, 9:08pm UTC](https://forums.losant.com/t/helper-function-pure-results-in-conditional-expressions/5664/3 "2024-10-29T21:08:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)
#### Post date: [October 31, 2024, 3:30pm UTC](https://forums.losant.com/t/helper-function-pure-results-in-conditional-expressions/5664/4 "2024-10-31T15:30:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)
#### Post date: [December 17, 2024, 7:58pm UTC](https://forums.losant.com/t/helper-function-pure-results-in-conditional-expressions/5664/5 "2024-12-17T19:58:50Z")

</div>

Today’s platform update exposes the [`includes` expression](https://docs.losant.com/workflows/accessing-payload-data/#includescollection-value) for use in a Conditional Node. Thanks for the feature suggestion.
