Hi,
In some ER code, I have found this kind of things :
rule!APP_GreaterTo(value: _, to: 14),
Discussion posts and replies are publicly visible
Underscore is used for partial evaluation.it gives you ability to evaluate the function without having that value defined yet.
Thank you GopalK,
I'd never thought of such an ability...
It's not used much anymore, because it was only ever required in the legacy looping functions, and the only one that can't be fully replaced by a!forEach(), is reduce() (sadly). But we don't need reject() or apply() anymore, so there aren't all that many cases where the _ operator is still needed - which is good because even those of us who knew how to use it, still tended to be fairly confused by it.
Thank you Mike, I understand better.
Find the documentation here: https://docs.appian.com/suite/help/22.2/Expressions.html#advanced-evaluation
I use that quite a bit to implement customizable and reusable interface components. It allows me to build a framework and let the designers inject their own means of how to render the actual content.
Very interesting, I've never read this documentation part.
Thank you