For the latest version of JMP Help, visit JMP.com/help.


Publication date: 11/29/2021

Data Filter

dtf<<Add Favorites(name)

Description

Associates the current filter selection with the quoted "name" and saves it in the Favorites list.

Returns

The favorite as a quoted string.

Example

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
df = dt << Data Filter(
	Add Filter(
		Columns( :age, :sex, :height, :weight ),
		Where( :sex == "F" ),
		Where( :height >= 55 & :height <= 65 )
	),
	Mode( Select (1) )
);
Wait( 1 ); // for demonstration purposes
fav1 = df << Add Favorites( "Female Average Ht" );

dtf<<Add Filter(Columns(column1, <column2>), <Where(clause)>)

Add one or more filter columns in a new OR group.

dtf<<Auto Clear(Boolean)

Clears all currently selected rows before setting a new selection.

dtf<<Clear

Clears the currently selected rows.

dtf<<Close

Closes the data filter window.

dtf<<Columns(column1, column2, ...)

Sets the columns to use in the data filter.

dtf<<Data Table Window

Shows the data table that the data filter window is using.

dtf<<Delete All

Removes all filters that are set.

dtf<<Delete(column1, column2, ...)

Removes the specified columns from the data filter.

dtf<<Display(column, <Size(x, y)>, "Blocks Display"|"List Display"|"Single Category Display"|"Checkbox Display")

Sets how the specified categorical column levels are displayed in the filter.

dtf<<Get Script

Returns the data filter script as text in the log.

Example

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
df = dt << Data Filter(
     Add Filter( Columns( :age, :sex ), Where( :age == 12 ) )
);
txt = df << Get Script;
Show( txt );

dtf<<Local Data Filter

Embeds the data filter in the specified window. See Add a Local Data Filter in the Scripting Guide for more information about local data filters.

dtf<<Location(x, y)

Moves the data filter window to the specified location. x and y are measured in pixels. 0,0 is the top left of the monitor.

dtf<<Make Filter Change Handler(function)

Creates a data filter handler to handle notification that the filter has changed. The number of rows filtered is returned in the argument to the function.

Example

dt = Open( "$SAMPLE_DATA/PopAgeGroupSubset.jmp" );
dist = Distribution( Automatic Recalc( 1 ), Continuous Distribution( Column( :POP ) ) );
filter = dist << Local Data Filter( Add Filter( Columns( :Region ) ) );
f = Function( {a}, Print( a ) );
rs = filter << Make Filter Change Handler( f );

dtf<<Make Subset

Creates a new subset data table that contains the rows that are selected in the data filter.

dtf<<Match(Filter Columns(column1, column2, ...), Where(clause)

Sets the filter conditions for each column. The Where clause is used for all the columns listed. To use different Where clauses for different columns, send the Match message separately for each column.

dtf<<Mode(Select(Boolean)|Show(Boolean)|Include(Boolean))

Sets the action, or mode, that is used when rows are selected using the data filter.

dtf<<Save and Restore Current Row States

Saves the current row states for the data table, and then restores those states when the data filter is closed.

dtf<<Show Columns Selector(Boolean)

Displays or hides the column selector after completing a filter.

dtf<<To Clipboard

Creates a Where clause from the current state of the data filter and places it on the clipboard, where it can be pasted elsewhere.

dtf<<To Data Table

Creates a Where clause from the current state of the data filter and saves it as a property to the data table.

dtf<<To Journal

Creates a Where clause from the current state of the data filter and appends it to the current journal. If there is no current journal, a new journal is opened and the Where clause is added to it.

dtf<<To Row State Column

Creates a row state column whose formula is the Where clause.

dtf<<To Script Window

Creates a Where clause from the current state of the data filter and appends it to the current script window. If there is no current script window, a new script window is opened and the Where clause is added to it.

dtf<<Use Floating Window(Boolean)

Sets whether the data filter window floats on top of its associated data table or behaves as a normal window.

dtf<<Where(clause)

Sets a condition for selecting rows.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).