cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Chris_Rodrigues
Level III

Get current state of Suppress Eval?

I know that in JSL I can change Suppress Eval flag on individual columns to prevent that column's formula from being evaluated.  This is useful for complex formulas that take a while to evaluate.  I can eval once and suppress it, but keep the formula intact so i can go back and eval again later if needed.

 

In some situations, when I am doing operations that iterate over multiple columns, I would like to know the current state of the Suppress Eval flag without actually changing it.  I have not been able to find any way to extract this information.  I can set the value to 1 or 0, but I cannot toggle it, and I cannot get the current value.  Is this possible?

 

 

Names Default To Here(1);
dt = Current Data Table();
col = Column(dt, "myColumn");
col << Suppress Eval(1);                  //suppresses formula eval
col << Suppress Eval(0);                  //un-suppresses formula eval

suppress_state = col << Suppress Eval;    //does not work as expected. sets suppress eval to 1.
Show(suppress_state);                     //prints "suppress_state = Scriptable[]" in the log.  current state not returned.

 

I also noticed that if Supress Eval is already set to 1 and the "col << Supress Eval" line executes, the following warning is displayed:

A message with an empty Boolean argument enabled an option that was already enabled. That option remains enabled. In previous versions of JMP, this would have disabled the option.

So in previous versions of JMP this option could be toggled, but this functionality has been removed.

 

I also looked at the output of Show Properties(col) and I found only one reference to Supress Eval:

Suppress Eval [Boolean] [Scripting Only]

So this means it is a function that accepts a Boolean argument, does not return a value, and is only accessible from Scripting?  Is there any way to get the value?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Get current state of Suppress Eval?

I am not aware of a direct way to get it, however this silly piece of code will work for it;

suppresseval = contains(char(:<yourcolumnname> <<get script),"Suppress Eval");
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Get current state of Suppress Eval?

I am not aware of a direct way to get it, however this silly piece of code will work for it;

suppresseval = contains(char(:<yourcolumnname> <<get script),"Suppress Eval");
Jim
Chris_Rodrigues
Level III

Re: Get current state of Suppress Eval?

That's a clever way to do it.  Thanks!