Python OR boolean expression

Hi there,

I’m trying to use a python expression in parameters such as

1 == op('table1')[0,0] or op('table1')[0,1] or op('table1')[0,2]
to switch on a “play” button if one of the three columns in my table is equal to 1.
It seems to be the right syntax but can’t figure out if it’s working properly.

Any hint is much appreciated!

Try

( op('table1')[0,0] == 1 ) or (op('table1')[0,1] == 1) or (op('table1')[0,2] == 1) 

or this:

1 in [op('table1')[0,0], op('table1')[0,1], op('table1')[0,2] ]
this return true if 1 occors in the list of table cell values

Part of your problem is that table cells are strings.

Test against “1” not 1 and use .val not .

Example:

‘1’ in [op(‘table1’)[0,0].val, op(‘table1’)[0,1].val, op(‘table1’)[0,2].val ]