Hi All,
Back with another JSL programming question. It's related to the other posts through, e.g. here.
I would like to have a Check Box() functionality that when the check box is checked (state=1), the selected rows (it happens to be rows where RSquare is negative) are selected and then hidden and removed so the updated Graph builder shows the desired output. Then, if the box is unchecked (state=0), in unhides and unexcludes those rows. The Set Function() call I'm using is below, and it works if I run the "script" of the Set Function() manually, but it doesn't do it automatically. I can't figure out what I'm missing in order for it to update automatically. I found a neat post here, and I'm trying to do something like what this person did, but for graph builder update.
JSL Set Function call:
cb << Set Function(<BR />{this},<BR />this = cb << Get;<BR />If(<BR />this == 1,<BR />dt_results << Select Rows( neg_rows ) << Hide and Exclude;<BR />dt_results << Clear Select;<BR />dt_tb = dt_results << Get As Report();,<BR />this == 0,<BR />dt_results << Select Rows( neg_rows ) << Unhide;<BR />dt_results << Select Rows( neg_rows ) << Unexclude;<BR />dt_results << Clear Select;<BR />dt_tb = dt_results << Get As Report()<BR />);<BR />);cb << Set Function(
{this},
this = cb << Get;
If(
this == 1,
dt_results << Select Rows( neg_rows ) << Hide and Exclude;
dt_results << Clear Select;,
this == 0,
dt_results << Select Rows( neg_rows ) << Unhide;
dt_results << Select Rows( neg_rows ) << Unexclude;
dt_results << Clear Select;
);
);Where cb is referred to earlier in the code as:
cb = Check Box( "Remove bad points (*'s)?", <<Set( 0 ) )
Starting output, or whenever check box is state = 0.:

Desired output whenever check box is state = 1:

It would be nice to also update the data table as Report on the right so that any of the rows that were excluded were then removed from the Report view on the right, but I think that might be much harder than it sounds. I tried adding an additional Get As Report update in the Set Function() command, but it does nothing.
Any feedback is appreciated, thanks!,
DS