<?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: Select values from report table or clipboard in local data filter in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330296#M57954</link>
    <description>&lt;P&gt;There may be better ways to do this, but here is my take on it.&amp;nbsp; If you create a separate window, with just a Button Box() in it, clicking on the button will run a simple script that can change the filter&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="select1.PNG" style="width: 803px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28116iD22A0DC8E2E6E5B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="select1.PNG" alt="select1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is the script that produces the above example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dis = dt &amp;lt;&amp;lt; Distribution( continuous Distribution( Column( :height ) ) );
lf = dis &amp;lt;&amp;lt; Local Data Filter( Add Filter( columns( :name ), Mode( Show( 1 ), Include( 1 ) ) ) );
	
	
nw = New Window( "Set Values",
	Button Box( "Click to Set Selection From Selected Rows",
		theRows = dt &amp;lt;&amp;lt; get selected rows;
		If( N Rows( theRows ) &amp;gt; 0, 
		
			theWhere = ":name == \!"" || dt:Name[theRows[1]] || "\!"";
			For( i = 2, i &amp;lt;= N Rows( theRows ), i++,
				theWhere = theWhere || " | :name == \!"" || dt:Name[theRows[i]] || "\!""
			);
			lf &amp;lt;&amp;lt; delete all;
	
			Eval( Parse( "lf &amp;lt;&amp;lt; add filter (Columns (:name), where( " || theWhere || " ) );" ) ),
			lf &amp;lt;&amp;lt; delete all;
			lf &amp;lt;&amp;lt; add Filter ( Columns (:name));
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 Nov 2020 20:33:40 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-11-05T20:33:40Z</dc:date>
    <item>
      <title>Select values from report table or clipboard in local data filter</title>
      <link>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330185#M57950</link>
      <description>&lt;P&gt;Is there a way to interactively select values from a table (data table or table in a report) and transfer those into a local data filter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Asking another way: it is straight forward to get values into a one-per-line list into the clipboard, can those be somehow selected in local data filter, or is there an alternate way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example workflow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Values to Local Data Filter.gif" style="width: 949px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28108i1B447849F2612E33/image-dimensions/949x581?v=v2" width="949" height="581" role="button" title="Values to Local Data Filter.gif" alt="Values to Local Data Filter.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:21:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330185#M57950</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2023-06-10T23:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select values from report table or clipboard in local data filter</title>
      <link>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330296#M57954</link>
      <description>&lt;P&gt;There may be better ways to do this, but here is my take on it.&amp;nbsp; If you create a separate window, with just a Button Box() in it, clicking on the button will run a simple script that can change the filter&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="select1.PNG" style="width: 803px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28116iD22A0DC8E2E6E5B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="select1.PNG" alt="select1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is the script that produces the above example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dis = dt &amp;lt;&amp;lt; Distribution( continuous Distribution( Column( :height ) ) );
lf = dis &amp;lt;&amp;lt; Local Data Filter( Add Filter( columns( :name ), Mode( Show( 1 ), Include( 1 ) ) ) );
	
	
nw = New Window( "Set Values",
	Button Box( "Click to Set Selection From Selected Rows",
		theRows = dt &amp;lt;&amp;lt; get selected rows;
		If( N Rows( theRows ) &amp;gt; 0, 
		
			theWhere = ":name == \!"" || dt:Name[theRows[1]] || "\!"";
			For( i = 2, i &amp;lt;= N Rows( theRows ), i++,
				theWhere = theWhere || " | :name == \!"" || dt:Name[theRows[i]] || "\!""
			);
			lf &amp;lt;&amp;lt; delete all;
	
			Eval( Parse( "lf &amp;lt;&amp;lt; add filter (Columns (:name), where( " || theWhere || " ) );" ) ),
			lf &amp;lt;&amp;lt; delete all;
			lf &amp;lt;&amp;lt; add Filter ( Columns (:name));
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Nov 2020 20:33:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330296#M57954</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-11-05T20:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Select values from report table or clipboard in local data filter</title>
      <link>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330361#M57958</link>
      <description>&lt;P&gt;Another thought,&lt;/P&gt;
&lt;P&gt;This could be automated by applying a Row State Handler on the data table.&amp;nbsp; Anytime a rowstate changed, it would trigger the running of the code that is currently in the Button Box, and update the local filter.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 22:19:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330361#M57958</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-11-05T22:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select values from report table or clipboard in local data filter</title>
      <link>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330362#M57959</link>
      <description>&lt;P&gt;Looks like it will be an add-in with your button-box script to the rescue!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;.&amp;nbsp; Will leave the post 'unsolved' for a bit just in case anyone comes up with no-script solution...&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 22:29:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-values-from-report-table-or-clipboard-in-local-data/m-p/330362#M57959</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2020-11-05T22:29:29Z</dc:date>
    </item>
  </channel>
</rss>

