I noticed an unexpected behavior in Jmp:
After creating a Formula column with a Custom Formula, another Formula Column gets evaluated every time I select a cell in the data table.
Why is the formula evaluated so many times?
- removing the myX =1; myX fro the first formula stops the behavior
- removing the custom formula from the second formula stops the behavior
Jmp 17.2
Names Default To Here( 1 );
row_count = 10;
dt = New Table( "myTable", Add Rows( row_count ), New Column( "X", set each value( Row() ) ) );
dt << New Column( "Formula As Constant",
Formula(
if(row()==1,write("\!N"));
Write("+1 ");
myX = 1;
myX
)
);
new namespace("test");
Add Custom Functions( New Custom Function( "test", "myFunc", Function( {}, 1 ) ) );
dt << New Column( "Formula via Custom Formula", Formula( test:myFunc() ) );