Several Questions (concat helper, variable compare expressions, handlebar expressions)

Hello

I have an array of Resources (department members), and I need to know if any of the email.to.address values contain any of the resource.resourceid.email values, and if so which one.

While I have a working implementation, it makes me sad, and searching for alternatives has led to a number of questions I have not been able to answer myself.

First, I know that I can use regex to split a single text block or variable into an array of matches, but is there a way of concatenating an array into a single multi-line string for easier searching?
Or perhaps a way to refer to (expression against) a single properly across all elements of an array?

Second, when building an expression for a step I can use “{{vairable}} contains ‘static string’”, but I don’t seem to be able to use “{{variable1}} contains {{variable2}}”. Is this by design? Any options to work around?

Third, as a long-shot, I may be able to simplify things with logic inside of render text expressions. eg.

{{#if email.subject}}{{email.subject}}{{else}}New email from {{email.from.address}}{{/if}}

but I wonder which other helpers are available? Does the #if support comparisons and matching? How about #each?

Hi @Mark,

Thanks for asking.

Before I answer your questions, I’d like to invite you to set up a rule or example in your account that demonstrates the limitation you’re trying to overcome. If you do that and send me the URL, I can see the context of what you’re building and better understand what you need. It will also help me think more creatively about new features or capabilities we could add to enable the workflow you’re trying to build.

As to your questions:

You can convert an array of objects into a single string using the {{implode ...}} helper (docs here).

You cannot currently compare two properties in an expression/condition if you want to check whether one property contains the other. You can check whether they are equal, but not whether one contains the other. I’m going to look into whether we can add support for this.

The text rendering engine is based on Handlebars.js. I don’t see a way to use the {{#if ...}} helper to accomplish what you’re trying to do, but feel free to experiment. If you find a way to make it work, let me know.

In any case, I’d appreciate a real-world example of something specific you need to build. Having a concrete use case will help me design enhancements that address what you actually need rather than just the immediate technical limitation.

Thanks!