<?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: Nested data filter row selection in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/594211#M79808</link>
    <description>&lt;P&gt;I have made Wish List item regarding different state handlers in JMP &lt;LI-MESSAGE title="Improve JMP's state handlers (hover label, row state handler, filter state handler, scheduler, ...)" uid="527992" url="https://community.jmp.com/t5/JMP-Wish-List/Improve-JMP-s-state-handlers-hover-label-row-state-handler/m-p/527992#U527992" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; .&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 18:01:52 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-01-27T18:01:52Z</dc:date>
    <item>
      <title>Nested data filter row selection</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/593164#M79708</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a project where I'll have data categorized in a data table and users will down select to a specific option via an interface I'm creating.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want the script below to do is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;In the left radio box, Choice 1, the person selects the age.&lt;OL&gt;&lt;LI&gt;In the data table all rows that are not that age are hidden and excluded in the data table.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;In the right radio box, Choice 2, it's dynamically updated to only show options that are not hidden or excluded and will contain a list of names to choose from.&lt;/LI&gt;&lt;LI&gt;Once both of these options are selected, only 1 row will remain, which the row number is returned in my_row.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like help on:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Rows are not hidden and excluded automatically when options from Choice 1 are selected, even though show(1) and include(1) are included in the filter terms&lt;/LI&gt;&lt;LI&gt;Radio box 2 is not dynamically updated as a result of the Choice 1&lt;/LI&gt;&lt;LI&gt;Both of these do not "work together", Choice 2 overwrites row states of Choice 1 and can select from any row. This is probably because it's not dynamically updated(?)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;References&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Nested-Multiple-Data-Filter-Context-Box/m-p/54915" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Nested-Multiple-Data-Filter-Context-Box/m-p/54915&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Scripting Index: Radio Box Display&lt;/LI&gt;&lt;/UL&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" );

dt &amp;lt;&amp;lt; Clear Row States;

New Window( "Example",
	Data Filter Context Box(
		H List Box(
			Panel Box( "Choice 1",
				dt &amp;lt;&amp;lt; Data Filter(
					Add Filter(
						columns( :age ),
						Display( :age, Size( 140, 185 ), "Radio Box Display" ),
						Mode( Select( 1 ), Show( 1 ), Include( 1 ) )
			)	)	),
			Panel Box( "Choice 2",
				H List Box(
					Data Filter Context Box(
						V List Box(
							dt &amp;lt;&amp;lt; Data Filter(
								Add Filter(
									columns( :name ),
									Display( :name, Size( 160, 150 ), Radio Box Display ),
									Mode( Select( 1 ) )
)	)	)	)	)	)	)	)	);

my_row = dt &amp;lt;&amp;lt; Get selected rows;
show( my_row );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:41:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/593164#M79708</guid>
      <dc:creator>StarfruitBob</dc:creator>
      <dc:date>2023-06-08T16:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Nested data filter row selection</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/593277#M79715</link>
      <description>&lt;P&gt;Here's an example of what I'm looking for, but I don't know how to get to the code, since it's an application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you have multiple data tables up:&lt;/P&gt;&lt;P&gt;Semiconductor Toolkit (link below) &amp;gt; Utilities (top right) &amp;gt; Attach Table Limits&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You first click on the table you want to view columns for, then a second list is generated on the right of what columns are present in the data table you clicked on. This will dynamically update if you choose a new data table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found something similar in the thread below, but am finding it difficult to translate this code into what I'm needing.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discussions/How-to-Dynamically-List-Column-names-of-Selected-Data-Table/m-p/415321#M66444" target="_blank"&gt;https://community.jmp.com/t5/Discussions/How-to-Dynamically-List-Column-names-of-Selected-Data-Table/m-p/415321#M66444&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Back to the original post:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Choice 1: if I click on "15", 7 rows in the dt are selected, the rest should be excluded and hidden.&lt;OL&gt;&lt;LI&gt;A secondary option is to use summarize( namelist = by( :name&amp;nbsp;) ), which will get me a list of unique names that aren't excluded or hidden, but without using radio box, this list will feed into Choice 2. I'm not sure how to make this dynamic.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Choice 2 will dynamically update a name list based upon the age selected in choice 1.&lt;/LI&gt;&lt;LI&gt;Once a selection in Choice 2 is made, only one row will be selected.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Let's say I select: Choice 1 = 15 &amp;amp; Choice 2 = Amy, then row 29 will be selected and I can use &amp;lt;&amp;lt; Get selected rows to save this row number to a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Semiconductor Toolkit add-in:&lt;BR /&gt;&lt;A href="https://community.jmp.com/t5/JMP-Add-Ins/Semiconductor-Toolkit/ta-p/22460" target="_blank"&gt;https://community.jmp.com/t5/JMP-Add-Ins/Semiconductor-Toolkit/ta-p/22460&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 22:36:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/593277#M79715</guid>
      <dc:creator>StarfruitBob</dc:creator>
      <dc:date>2023-01-25T22:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Nested data filter row selection</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/593281#M79716</link>
      <description>&lt;P&gt;I have a feeling I'm close, I'm running into two problems now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've modified the solution code from the thread below further.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discussions/How-to-Dynamically-List-Column-names-of-Selected-Data-Table/m-p/415321#M66444" target="_blank"&gt;https://community.jmp.com/t5/Discussions/How-to-Dynamically-List-Column-names-of-Selected-Data-Table/m-p/415321#M66444&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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/Big Class.jmp" );

dt &amp;lt;&amp;lt; clear row states;

Summarize( myage = By( :age ) );

//make a dialog window
nw = New Window( "Sample",
	vlb1 = H List Box(
		lb1 = Border Box(
		
			obj1 = dt &amp;lt;&amp;lt; Data Filter(
				Add Filter( columns( :age ) ),
				Display( :age, "Radio Box Display" ),
				Mode( Select( 1 ), Show( 1 ), Include( 1 ) )
			);
			Wait( 0 );
			
			// Creates list of names that are not excluded or hidden
			Try( namelist = Summarize( myname = By( :name ) ) );
			
			//here is the script that runs each time someone clicks in the top box
			//delete the current column list box, if it exists
			Try( lb2 &amp;lt;&amp;lt; delete );				
			
			//append a new col list box, with all columns of the data table selected in the listbox
			vlb1 &amp;lt;&amp;lt; append( lb2 = Border Box( Left( 10 ), Right( 10 ), bottom( 10 ), top( 10 ), sides( 15 ), // Col title
					Panel Box( "Select Script",
						sel1 = radio box( eval( namelist ), show( my_names = sel1 &amp;lt;&amp;lt; Get Selected) )	)	 
					), all ) );
	) 
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you comment out all of&amp;nbsp;vlb1, you get a small box that you can select from the different ages in Big Class. The other rows are excluded and hidden.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problems:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The second summarize, namelist, is not dynamically updating with different age selection. How can the script be updated to do this?&lt;OL&gt;&lt;LI&gt;The second Try() is from the solution code and is dynamic, so I'm not sure why the first one wouldn't be.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;JMP errors out when the vlb1 is uncommented, error picture below. I'm not sure where the deleted object reference is in this part of the code. Can anyone see it?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StarfruitBob_0-1674687944177.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49448iC272215E210F70FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StarfruitBob_0-1674687944177.png" alt="StarfruitBob_0-1674687944177.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think if these two can be solved, then I should be able to find some way to return a single row number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 23:07:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/593281#M79716</guid>
      <dc:creator>StarfruitBob</dc:creator>
      <dc:date>2023-01-25T23:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Nested data filter row selection</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/593930#M79782</link>
      <description>&lt;P&gt;Using fully customized filters could be fairly simple solution. This on other hand might not be even if it works (this one time)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt &amp;lt;&amp;lt; Data Filter(
	Location({2793, 233}),
	Conditional,
	Mode(Show(1), Include(1)),
	Add Filter(
		columns(:age, :name),
		Display(:age, N Items(6)),
		Display(:name, N Items(15), Find(Set Text("")))
	)
);

(Window("Data Filter for Big Class")["Data Filter",LineUpBox(2)]) &amp;lt;&amp;lt; NCol(2);
(Window("Data Filter for Big Class")["Data Filter",LineUpRulerBox(1)]) &amp;lt;&amp;lt; Widths({300,300});
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Below are some modifications to your script using Filter Change Handler (state handlers can be very buggy and finicky in JMP, you have been warned :))&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt &amp;lt;&amp;lt; clear row states;

Summarize(myage = By(:age));

//make a dialog window
nw = New Window("Sample",
	vlb1 = H List Box(
		lb1 = Border Box(
			obj1 = dt &amp;lt;&amp;lt; Data Filter(Add Filter(columns(:age)), Display(:age, "Radio Box Display"), Mode(Select(1), Show(1), Include(1)))
		),
		lb2 = Border Box()
	)
);

// Creates list of names that are not excluded or hidden
f = function({a},
	Try(Summarize(myname = By(:name)));
	//here is the script that runs each time someone clicks in the top box
	//delete the current column list box, if it exists
	Try((lb2 &amp;lt;&amp;lt; child) &amp;lt;&amp;lt; delete box());

	//append a new col list box, with all columns of the data table selected in the listbox
	lb2 &amp;lt;&amp;lt; append(
		Panel Box("Select Script", sel1 = Radio Box(myname, Show(my_names = sel1 &amp;lt;&amp;lt; Get Selected)))
	);
);

fch = obj1 &amp;lt;&amp;lt; Make Filter Change Handler(f);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jan 2023 09:27:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/593930#M79782</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-01-27T09:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Nested data filter row selection</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/594208#M79807</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;, thank you once again for your incredible help!&amp;nbsp; The answer was so simple, yet again ahaha.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I modified your first suggestion to suit my needs because I see what you mean by&amp;nbsp;&lt;SPAN&gt;state handlers being buggy and finicky&amp;nbsp;in JMP.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 17:51:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/594208#M79807</guid>
      <dc:creator>StarfruitBob</dc:creator>
      <dc:date>2023-01-27T17:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Nested data filter row selection</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/594211#M79808</link>
      <description>&lt;P&gt;I have made Wish List item regarding different state handlers in JMP &lt;LI-MESSAGE title="Improve JMP's state handlers (hover label, row state handler, filter state handler, scheduler, ...)" uid="527992" url="https://community.jmp.com/t5/JMP-Wish-List/Improve-JMP-s-state-handlers-hover-label-row-state-handler/m-p/527992#U527992" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; .&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 18:01:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-data-filter-row-selection/m-p/594211#M79808</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-01-27T18:01:52Z</dc:date>
    </item>
  </channel>
</rss>

