<?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 Re: How do i get the list box to work? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561682#M77476</link>
    <description>&lt;P&gt;Many thanks for this, this certainly helps! Would you know if it's possible to have local data filter positioned below the graph instead of on the left?&lt;/P&gt;</description>
    <pubDate>Fri, 28 Oct 2022 09:39:19 GMT</pubDate>
    <dc:creator>AbbWorld27</dc:creator>
    <dc:date>2022-10-28T09:39:19Z</dc:date>
    <item>
      <title>How do i get the list box to work?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561636#M77472</link>
      <description>&lt;P&gt;I am new to JMP and I came across the List Box which allows us to filter data based on the selection, but it is currently not working for me. I am getting the list box to display, but it doesn't change anything in the graph. I would expect the time to change based on arrival or departure.Any suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$sample_data/Air Traffic.jmp");
m_name = dt:Event &amp;lt;&amp;lt; get values &amp;lt;&amp;lt; As List(m_name);

gb_default = Expr(
	Graph Builder(
		Size(550, 372),
		Show Control Panel(0),
		Fit to Window("Off"),
		Variables(X(:Airline), Y(:Original Time)),
		Elements(Box Plot(X, Y, Legend(19)))
	);
);

nw = New Window("Traffic Monitor ",
	gb = gb_default;
	lbcontent = Lineup Box(N Col(10),
		Spacer Box(Size(1, 0)),
		Spacer Box(Size(1, 0)),
		Spacer Box(Size(1, 0)),
		Text Box("Airline: ", &amp;lt;&amp;lt;Set Font Size(10)),
		List1 = List Box(m_name, nlines(3), width(50)),
		List1 &amp;lt;&amp;lt; Set Items(m_name) &amp;lt;&amp;lt; Get Selected
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:28:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561636#M77472</guid>
      <dc:creator>AbbWorld27</dc:creator>
      <dc:date>2023-06-11T11:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the list box to work?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561654#M77473</link>
      <description>&lt;P&gt;I would suggest using Local Data Filter for this instead of building list box with some custom jsl.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add local data filter from Toolbar&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1666946406405.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46681i5111E3B8F8E2AD77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1666946406405.png" alt="jthi_0-1666946406405.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;or red triangle menu&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1666946422639.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46682iBEABE8311A5ADABD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1666946422639.png" alt="jthi_1-1666946422639.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$sample_data/Air Traffic.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(550, 406),
	Show Control Panel(0),
	Fit to Window("Off"),
	Variables(X(:Airline), Y(:Original Time), Group X(:Event)),
	Elements(Box Plot(X, Y, Legend(19))),
	Local Data Filter(
		Add Filter(columns(:Event), Where(:Event == {"Arrive", "Depart"}))
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1666946444979.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46683i9FF4B358EB117645/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1666946444979.png" alt="jthi_2-1666946444979.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 08:41:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561654#M77473</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-10-28T08:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the list box to work?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561682#M77476</link>
      <description>&lt;P&gt;Many thanks for this, this certainly helps! Would you know if it's possible to have local data filter positioned below the graph instead of on the left?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 09:39:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561682#M77476</guid>
      <dc:creator>AbbWorld27</dc:creator>
      <dc:date>2022-10-28T09:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the list box to work?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561685#M77477</link>
      <description>&lt;P&gt;I think you can do it at least by using Data Filter Context Box and data filter source box&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$sample_data/Air Traffic.jmp");

nw = New Window("Selection Filter",
	Data Filter Context Box(
		V List Box(
			gb = dt &amp;lt;&amp;lt; Graph Builder(
				Size(550, 406),
				Show Control Panel(0),
				Fit to Window("Off"),
				Variables(X(:Airline), Y(:Original Time), Group X(:Event)),
				Elements(Box Plot(X, Y, Legend(19)))
			),
			dfsb = Data Filter Source Box(
				dt &amp;lt;&amp;lt; Data Filter(
					Local,
					Mode(Show(1), Include(1)),
					Add Filter(columns(:Event), Where(:Event == {"Arrive", "Depart"}))
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Oct 2022 09:45:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561685#M77477</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-10-28T09:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the list box to work?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561719#M77481</link>
      <description>&lt;P&gt;Having some issues with both the local data filter &amp;amp; combo box fitting in. I am trying to build a tool for my company so I need the legend to be interactive, at the same time I want some to be able to put filters based on a column "season" in this example. But as I soon as I change the legend, the local data filter keeps expanding to down the graph. Would you know what I can do to improve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've taken the animals data table as it's very small&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt = Open("$sample_data/Animals.jmp");&lt;BR /&gt;xlist = dt &amp;lt;&amp;lt; Get Column Names( String );&lt;/P&gt;&lt;P&gt;gb_default = Expr(&lt;BR /&gt;Graph Builder(&lt;BR /&gt;Size( 544, 356 ),&lt;BR /&gt;Show Control Panel( 0 ),&lt;BR /&gt;Legend Position( "Bottom" ),&lt;BR /&gt;Fit to Window( "Off" ),&lt;BR /&gt;Variables( X( :species ), Y( :miles ), Color( :subject ) ),&lt;BR /&gt;Local Data Filter(&lt;BR /&gt;Add Filter(&lt;BR /&gt;columns( :season ),&lt;BR /&gt;Display( :season, Size( 160, 60 ), List Display )&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;Elements( Points( X, Y, Legend( 23 ) ) ),&lt;BR /&gt;SendToReport(&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"400",&lt;BR /&gt;LegendBox,&lt;BR /&gt;{Orientation( "Horizontal" ), Sides( "Left" )}&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;gb_change = Expr(&lt;BR /&gt;Graph Builder(&lt;BR /&gt;Size( 544, 356 ),&lt;BR /&gt;Show Control Panel( 0 ),&lt;BR /&gt;Legend Position( "Bottom" ),&lt;BR /&gt;Fit to Window( "Off" ),&lt;BR /&gt;Variables( X( :species ), Y( :miles ), Color( Column( dt, ycol )) ),&lt;BR /&gt;Local Data Filter(&lt;BR /&gt;Add Filter(&lt;BR /&gt;columns( :season ),&lt;BR /&gt;Display( :season, Size( 160, 60 ), List Display )&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;Elements( Points( X, Y, Legend( 23 ) ) ),&lt;BR /&gt;SendToReport(&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"400",&lt;BR /&gt;LegendBox,&lt;BR /&gt;{Orientation( "Horizontal" ), Sides( "Left" )}&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;nw = New Window( "Animal test ",&lt;BR /&gt;gb = gb_default;&lt;BR /&gt;lbcontent = Lineup Box( N Col( 10 ),&lt;BR /&gt;Spacer Box( Size( 1, 0 ) ),&lt;BR /&gt;Text Box( "Color: ", &amp;lt;&amp;lt;Set Font Size( 10 ) ),&lt;BR /&gt;ycb = Combo Box(&lt;BR /&gt;xlist,&lt;BR /&gt;&amp;lt;&amp;lt;Set( 2 ),&lt;BR /&gt;&amp;lt;&amp;lt;Set Function(&lt;BR /&gt;Function( {},&lt;BR /&gt;ycol = ycb &amp;lt;&amp;lt; Get;&lt;BR /&gt;gb &amp;lt;&amp;lt; delete;&lt;BR /&gt;nw &amp;lt;&amp;lt; Prepend( gb = gb_change );&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;);&lt;BR /&gt;);&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 10:31:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561719#M77481</guid>
      <dc:creator>AbbWorld27</dc:creator>
      <dc:date>2022-10-28T10:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the list box to work?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561720#M77482</link>
      <description>&lt;P&gt;On the above, would you advise me to use data filters for both of them?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 10:33:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561720#M77482</guid>
      <dc:creator>AbbWorld27</dc:creator>
      <dc:date>2022-10-28T10:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the list box to work?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561723#M77483</link>
      <description>&lt;P&gt;When using the Data Filter, it should not be necessary to add the Data Filter Source Box().&amp;nbsp; Thought it does work on desktop JMP, it can affect other output such as to JMP Live.&amp;nbsp; The Data Filter Source Box should be added when you want to use a platform to filter one (or more) other platforms.&amp;nbsp; This modifies the script from&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp; to demonstrate both.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$sample_data/Air Traffic.jmp");

nw = New Window("Filter examples",
	H List Box(
		Tab Page Box("Data Filter",
			Data Filter Context Box(
				V List Box(
					gb = dt &amp;lt;&amp;lt; Graph Builder(
						Size(550, 406),
						Show Control Panel(0),
						Fit to Window("Off"),
						Variables(X(:Airline), Y(:Original Time), Group X(:Event)),
						Elements(Box Plot(X, Y, Legend(19)))
					),
					dt &amp;lt;&amp;lt; Data Filter(
						Local,
						Mode(Show(1), Include(1)),
						Add Filter(columns(:Event), Where(:Event == {"Arrive", "Depart"}))
					)
				)
			)
		),
		Tab Page Box("Selection Filter",
			Data Filter Context Box(
				V List Box(
					gb = dt &amp;lt;&amp;lt; Graph Builder(
						Size(550, 406),
						Show Control Panel(0),
						Fit to Window("Off"),
						Variables(X(:Airline), Y(:Original Time), Group X(:Event)),
						Elements(Box Plot(X, Y, Legend(19)))
					),
					Data Filter Source Box(
						dt &amp;lt;&amp;lt; Graph Builder(
							Size( 343, 132 ),
							Show Control Panel( 0 ),
							Fit to Window( "Off" ),
							Variables( Y( :Event ) ),
							Elements( Bar( Y, Legend( 2 ) ) )
						)
					)
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Oct 2022 10:39:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-get-the-list-box-to-work/m-p/561723#M77483</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2022-10-28T10:39:09Z</dc:date>
    </item>
  </channel>
</rss>

