evaluate DAT examples

hello

i’m often frustrated when trying to use the evaluate DAT. especially now that i’m using 088 and python.

it would be really really helpful to have some more examples. like a complete example of how to successfully wire up and use each output option. how to use expressions and commands to modify input table examples. real world examples- a handful so we can get our heads around proper syntax and setup.

here’s one i’m working on. should be simple, but i can’t get it (or other variations of this attempt) to work.

i have a simple table of 1s and 0s as an input (data) table. i have this in the second input (formula) table…

1 if me.inputCell == 0

this should set all the 0s to 1s. if i try the “expressions” output i get error - “unexpected EOF while parsing”. if i try “command” output i get “name ‘execute’ is not defined”.

i also find it difficult to get my head around how to have a multi-line python statement condensed to a single line, which is seemingly how the evaluate DAT wants it’s expressions and commands…?

thanks!

Add the else at the end of the 1 line if

So something like:

1 if me.inputCell == 0 else me.inputCell

thanks elburz

how did you know to add the else? seems redundant. but totally works!