<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Preset filters as button boxes in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825799#M100631</link>
    <description>&lt;P&gt;I am trying to create button boxes where I can have set parameters that the global filter is assigned to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the example below I would like a button for females only and another one with male and height greater than 60&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	dt = Open( "$SAMPLE_DATA/big class.jmp" );
	
	gra1=hlistbox(dt&amp;lt;&amp;lt;Graph Builder(
	Size( 528, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 11 ) ), Smoother( X, Y, Legend( 12 ) ) )
));

tab1=hlistbox(dt&amp;lt;&amp;lt;Tabulate(
	Show Control Panel( 0 ),
	Full Path Column Name( 1 ),
	Add Table(
		Column Table( Analysis Columns( :height ) ),
		Row Table( Grouping Columns( :name, :sex ) )
	)
));

fil1=hlistbox(dt&amp;lt;&amp;lt;Data Filter(
	Auto clear( 1 ),
	Show Histograms and Bars( 0 ),
	Mode( Show( 0 ) ),
	Add Filter(
		columns( :sex, :age, :height ),
		Display( :age, N Items( 6 ) ),
		Display( :height, Height( 20 ) )
	)
));

win1=New Window("Example", hlistbox(fil1, vlistbox(gra1, tab1)));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 03 Jan 2025 18:38:51 GMT</pubDate>
    <dc:creator>AlanBell</dc:creator>
    <dc:date>2025-01-03T18:38:51Z</dc:date>
    <item>
      <title>Preset filters as button boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825799#M100631</link>
      <description>&lt;P&gt;I am trying to create button boxes where I can have set parameters that the global filter is assigned to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the example below I would like a button for females only and another one with male and height greater than 60&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	dt = Open( "$SAMPLE_DATA/big class.jmp" );
	
	gra1=hlistbox(dt&amp;lt;&amp;lt;Graph Builder(
	Size( 528, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 11 ) ), Smoother( X, Y, Legend( 12 ) ) )
));

tab1=hlistbox(dt&amp;lt;&amp;lt;Tabulate(
	Show Control Panel( 0 ),
	Full Path Column Name( 1 ),
	Add Table(
		Column Table( Analysis Columns( :height ) ),
		Row Table( Grouping Columns( :name, :sex ) )
	)
));

fil1=hlistbox(dt&amp;lt;&amp;lt;Data Filter(
	Auto clear( 1 ),
	Show Histograms and Bars( 0 ),
	Mode( Show( 0 ) ),
	Add Filter(
		columns( :sex, :age, :height ),
		Display( :age, N Items( 6 ) ),
		Display( :height, Height( 20 ) )
	)
));

win1=New Window("Example", hlistbox(fil1, vlistbox(gra1, tab1)));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jan 2025 18:38:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825799#M100631</guid>
      <dc:creator>AlanBell</dc:creator>
      <dc:date>2025-01-03T18:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Preset filters as button boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825813#M100632</link>
      <description>&lt;P&gt;Could you maybe just utilize Favorites?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1735930448126.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71666i452635692999D423/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1735930448126.png" alt="jthi_0-1735930448126.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you wish to have buttons, you could still utilize favorites (add them first and then make buttons apply those favorites). Look for Data Filter (on the left) from scripting index for all sorts of useful options:&lt;/P&gt;
&lt;P&gt;Using favorite (this example gives pretty good idea of what you could do)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1735930534378.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71668i60D8464AA492CE95/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1735930534378.png" alt="jthi_2-1735930534378.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Using Where:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1735930556447.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71669iDE2BBDAD11931AA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1735930556447.png" alt="jthi_3-1735930556447.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/18.0/#page/jmp/data-filter-messages.shtml#" target="_blank"&gt;https://www.jmp.com/support/help/en/18.0/#page/jmp/data-filter-messages.shtml#&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And for buttons you can use Button Box()&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/18.0/#page/jmp/construct-display-boxes-for-new-windows.shtml#ww496557" target="_blank"&gt;https://www.jmp.com/support/help/en/18.0/#page/jmp/construct-display-boxes-for-new-windows.shtml#ww496557&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 18:57:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825813#M100632</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-03T18:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Preset filters as button boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825814#M100633</link>
      <description>&lt;P&gt;Thanks, I would like to have buttons visible rather than favorites.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to use filter columns and match in a function to no avail!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have gone through the scripting index and searched everywhere, used the new learnbot from the store as well as ChatGPT!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems odd it has not been implemented before.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 19:05:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825814#M100633</guid>
      <dc:creator>AlanBell</dc:creator>
      <dc:date>2025-01-03T19:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Preset filters as button boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825817#M100635</link>
      <description>&lt;P&gt;This does show few different options&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/big class.jmp");
	
gra1 = H List Box(
	dt &amp;lt;&amp;lt; Graph Builder(
		Size(528, 450),
		Show Control Panel(0),
		Variables(X(:height), Y(:weight), Overlay(:sex)),
		Elements(Points(X, Y, Legend(11)), Smoother(X, Y, Legend(12)))
	)
);

tab1 = H List Box(
	dt &amp;lt;&amp;lt; Tabulate(
		Show Control Panel(0),
		Full Path Column Name(1),
		Add Table(Column Table(Analysis Columns(:height)), Row Table(Grouping Columns(:name, :sex)))
	)
);

fil1 = H List Box(
	df = dt &amp;lt;&amp;lt; Data Filter(
		Auto clear(1),
		Show Histograms and Bars(0),
		Mode(Show(0)),
		Add Filter(columns(:sex, :age, :height), Display(:age, N Items(6)), Display(:height, Height(20)))
	)
);

df &amp;lt;&amp;lt; Match(Filter Columns(:sex, :age, :height), Where(:sex == "F"));
df &amp;lt;&amp;lt; add favorites("F only");
df &amp;lt;&amp;lt; Clear;

win1 = New Window("Example", 
	V List Box(
		Lineup Box(N Col(2),
			Button Box("F Only",
				df &amp;lt;&amp;lt; Apply Favorites("F only")
			),
			Button Box("M, height &amp;gt;= 60",
				df &amp;lt;&amp;lt; (Filter Column(:sex) &amp;lt;&amp;lt; Where(:sex == "M"));
				df &amp;lt;&amp;lt; (Filter Column(:height) &amp;lt;&amp;lt; Extend Where(:height &amp;gt;= 60));
			)
		),
		H List Box(
			fil1, 
			V List Box(
				gra1
				, tab1
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jan 2025 19:20:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825817#M100635</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-03T19:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Preset filters as button boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825818#M100636</link>
      <description>&lt;P&gt;Thank you so much!!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 19:26:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Preset-filters-as-button-boxes/m-p/825818#M100636</guid>
      <dc:creator>AlanBell</dc:creator>
      <dc:date>2025-01-03T19:26:26Z</dc:date>
    </item>
  </channel>
</rss>

