and how about table updates?
If Jmp updates the entries in col 1 , all 3 4 *) variants get updated - so everything seems to be fine ...
edit:
I added a 4th version similar to the first one, but with the formula split into 2 steps.
Names Default To Here(1);
row_count = 10;
dt = New Table("test",
Add Rows(row_count),
New Column("col1", set each value(row())),
New Column("col2", set each value(Random Integer(1,row_count*2))));
wait(0);
New Column( "compact Formula", Formula( Contains( :col1 << Get Values, :col2 ) > 0 ), Set Property("Color Gradient",{"Stoplight Bad to Good"(1), Range( {0, 1, 0.5} )}),Color Cell by Value);
New Column( "Formula with 2 steps", Formula( myList = :col1 << Get Values ; Contains( myList, :col2 ) > 0 ),Set Property("Color Gradient",{"Stoplight Bad to Good"(1), Range( {0, 1, 0.5} )}),Color Cell by Value);
New Column( "Formula with local variable", Formula( Local( {t0 = :col1 << get values()}, Contains( t0, :col2 ) > 0 ) ),Set Property("Color Gradient",{"Stoplight Bad to Good"(1), Range( {0, 1, 0.5} )}),Color Cell by Value);
New Column( "Formula As Constant", Formula(As Constant( t_1 = :col1 << get values ); Contains( t_1, :col2 ) > 0),Set Property("Color Gradient",{"Stoplight Bad to Good"(1), Range( {0, 1, 0.5} )}),Color Cell by Value);
new window("info", << modal,Text Box ("Please confirm: after the first evaluation,
all values are correct.
And after running the next 2 lines of code, the values are correctly updated.
But now, let's try to change values in col1 manually. will the computed columns be updated?"));
:col1 << set each value(-10);
:col1[1] = :col2[2];
edit:
added color cell by value to make the issue better visible
green: match is found
red: no match is found
the column Formula with local variable works. It can be used as a reference to judge the result of the other columns.