<?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: Capturing selections made by a user using the local data filter in Graph Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Capturing-selections-made-by-a-user-using-the-local-data-filter/m-p/399405#M65026</link>
    <description>&lt;P&gt;Here is the entry from the Scripting Index that shows how to return the Where Clause used in the seleeellll&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt &amp;lt;&amp;lt;
local Data Filter(
	Add( Filter Columns( :Region, :Lead ) )
);
Wait( 1 );
obj &amp;lt;&amp;lt; (Filter Column( :Lead ) &amp;lt;&amp;lt;
Where( :Lead &amp;gt;= .4 &amp;amp; :Lead &amp;lt;= 1.4 ));
txt = obj &amp;lt;&amp;lt; get where clause;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Jul 2021 19:14:59 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-07-07T19:14:59Z</dc:date>
    <item>
      <title>Capturing selections made by a user using the local data filter in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Capturing-selections-made-by-a-user-using-the-local-data-filter/m-p/399377#M65024</link>
      <description>&lt;P&gt;I would like to be able to capture the selection made when a user selects a value using the local data filter for a Graph Builder object.&lt;/P&gt;
&lt;P&gt;For example in the snippet below, if I selected "Apple" using the local data filter, how do I capture "Apple" in a variable so I can put it in a chart title.&lt;/P&gt;
&lt;P&gt;Does this require the use of the row state handler? I have not used that before.&amp;nbsp; Thank you! -Jens&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);
Clear Log();

// Some data
dt = New Table ( "Fruits", Add Rows( 3 ),
     New Column( "Fruit" , Character, "Nominal", Set Values( {"Pear", "Apple", "Orange"} ))
);

// A report with a local data filter
gb = dt &amp;lt;&amp;lt; Graph Builder(Size( 528, 448 ),Show Control Panel( 0 ),Show Legend( 0 ),
     Variables( X  ( :Fruit ) ),
     Elements ( Bar( X, Legend( 3 ) ) ),
     Local Data Filter( Mode, Add Filter( columns( :Fruit ) ) )
);

// want to capture value of Local Data Filter selection into a variable
ldf_selection = ???&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:15:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Capturing-selections-made-by-a-user-using-the-local-data-filter/m-p/399377#M65024</guid>
      <dc:creator>JensRiege</dc:creator>
      <dc:date>2023-06-11T11:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing selections made by a user using the local data filter in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Capturing-selections-made-by-a-user-using-the-local-data-filter/m-p/399405#M65026</link>
      <description>&lt;P&gt;Here is the entry from the Scripting Index that shows how to return the Where Clause used in the seleeellll&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt &amp;lt;&amp;lt;
local Data Filter(
	Add( Filter Columns( :Region, :Lead ) )
);
Wait( 1 );
obj &amp;lt;&amp;lt; (Filter Column( :Lead ) &amp;lt;&amp;lt;
Where( :Lead &amp;gt;= .4 &amp;amp; :Lead &amp;lt;= 1.4 ));
txt = obj &amp;lt;&amp;lt; get where clause;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jul 2021 19:14:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Capturing-selections-made-by-a-user-using-the-local-data-filter/m-p/399405#M65026</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-07-07T19:14:59Z</dc:date>
    </item>
  </channel>
</rss>

