@hongboji please provide an alternative solution for this use-case:
I want to be able to set a variable with JS (for example during Event Flow on a page) that can be used in Linkage Rules via UI on the same page. How to do that?
(Reason: I have complex conditions that are easy to process in JS, and then I can simply set a variable to true/false that the UI can use to determine if something can be visible or not.)
JavaScript variables are complex structures that cannot be used directly in the UI. They need to be parsed and used in JavaScript. You can use them in a JavaScript block.
@hongboji I understand that variables can be many types and content, but in the UI for Linkage Rules I can select the previously defined JS-variable. This is indicating to me, that they are usable here.
I understand now that the JS-variable contains an object.
Why not letting the “value”-key of the object be usable in the Linkage Rules to check it against a boolean, numeric og string value? This would be very useful to build powerful rules. And while we are at that, why not being able to use JS in the Linkage Rules as a condition?