I used the MAP transformation in rules DSL files and I would like to use the same in JS scripts. I tried “transform”, “Transformations.transform” and some other variations, but had no success in getting it working without a JS error. Is there a way to use transformations in ECMAScript UI scripts?
There is actually a little bit better approach that you can use in JS Scripting (ECMAScript 2021). The helper library that comes with the add-on makes these sorts of things a little easier. But this is one place where I think it was missed. Transformation isn’t there in actions. I’ll open PR to add it. When it’s added you’d just need the following.
Thanks for this hint! I saw the comments in your issue and tried it - and it is already working fine! I’m just wondering as I thought I tried something similar, but maybe I tried Transformations as plural or so.
Anyhow, this is the nicest solution, thanks!