Expression for Value in Array


After the dropdown bi-directional binding to array tags have been fixed, I want to test if something is in the selected array.

As a test I have a dropdown where days of the week are selected. I want to make an expression tag to check if today (getDayOfWeek(now())) is in that array, but I can’t seem to find the equivalent of the Python in. See example below:

Is there an expression I can use? I don’t really want to resort to runScript()


Can you create a change script on value (on the dropdown) then push this where you want?

Starting in 8.1.8 (releasing very soon), you’ll be able to use indexOf() on the array for this; it’ll return -1 if the target value is not found.
Unfortunately, in the meantime I think runScript is your best bet.

Excellent. I can wait for 8.1.8.

I saw the indexOf(), but for the time being the documentation only refers to string. Will use when upgrading.