Subscribe Bookmark RSS Feed

Scripting "Save where clause" in a Data filter

fanienel

Community Trekker

Joined:

Mar 6, 2012


Hi,

I would like to draw a histogram using a journal script with data selected previously using a Data Filter.  But I need to print the 'where clause' on the output. The "Save where clause" copies this manually. Is there a way of doing this in a script?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

df = dt << Data Filter;

// Save WHERE clause with any of the commands below

df << to Clipboard;

df << to Journal

df << to Row State Column;

df << to Data Table;

df << to Script Window;

4 REPLIES
Solution

df = dt << Data Filter;

// Save WHERE clause with any of the commands below

df << to Clipboard;

df << to Journal

df << to Row State Column;

df << to Data Table;

df << to Script Window;

fanienel

Community Trekker

Joined:

Mar 6, 2012

Thank you MS,

That was just what I needed.

ian_jmp

Staff

Joined:

Jun 23, 2011

Not quite sure of your intended result, but perhaps something like this?

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.JMP");

nw = NewWindow("Distribution with Where Clause",

  dist = dt << Distribution(

  Automatic Recalc( 1 ),

  Continuous Distribution( Column( :weight ) ),

  Nominal Distribution( Column( :age ) ),

  Invisible

  );

  );

ldf = dist << Local Data Filter( Mode, Add Filter( columns( :sex ), Where( :sex == "M" ) ) );

ldf << To Journal;

nw << Journal;

nw << CloseWindow;

Close(dt, NoSave);



fanienel

Community Trekker

Joined:

Mar 6, 2012

Hi Guys

Is there a way to pass the where clause to a string variable?

Thanks