<?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 Copying Saved Local Data Filter Script from to Data Table to Other Platforms in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Copying-Saved-Local-Data-Filter-Script-from-to-Data-Table-to/m-p/930624#M108754</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two problems related to using the local data filter within JSL. I'm using JMP 17.&lt;/P&gt;
&lt;P&gt;I'm designing a script where a user is prompted to select from a list that gets passed to a local data filter within a Graph Builder object.&amp;nbsp; This part is fine but once the graph opens I want to save the local data filter to the main data table. The JMP log doesn't record this when I do it manually so I'm not what's the way script this. I've read the scripting index on the "Copy Local Data Filter()" and Paste Local Data Filter()" functions but not that's not exactly what I want. So my first problem is how does one save the local data filter script from a report window to the main data table?&lt;/P&gt;
&lt;P&gt;My second problem is how to reuse that filter. I have another script which creates a different report but will use the same local data filter. I've experimented with using Get Table Property() function on the saved Local Data Filter script but that doesn't seem to apply properly to the new report window.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand that consolidating the two scripts into one big script would solve my problems, however, I've separated it to simplify the user experience. It's not ideal but I think my idea could work but I've figure it out on my own. I would greatly appreciate if anyone could help me troubleshoot these problems.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Cathal&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/Car Poll.jmp" );

// First graph
obj1 = dt &amp;lt;&amp;lt; Distribution(
	Nominal Distribution( Column( :country ) ),
	Local Data Filter(
		Add Filter( columns( :sex ), Where( :sex == "Female" ) ),
		Mode( Show( 1 ), Include( 1 ) )
	)
);

// How to save "Local Data Filter" to data table?

// Manually add filter
dt &amp;lt;&amp;lt; New Script( "Local Data Filter",
Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ) )
);

// Second graph
obj2 = dt &amp;lt;&amp;lt; Distribution(
	Stack( 1 ),
	Nominal Distribution(
		Column( :marital status ),
		Horizontal Layout( 1 ),
		Vertical( 0 )
	),
);

// Get local data filter
filter = dt &amp;lt;&amp;lt; Get Table Property( "Local Data Filter" );&lt;BR /&gt;&lt;BR /&gt;//&amp;nbsp;How&amp;nbsp;to&amp;nbsp;apply&amp;nbsp;filter&amp;nbsp;to&amp;nbsp;obj2?&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Feb 2026 11:03:31 GMT</pubDate>
    <dc:creator>Cathal</dc:creator>
    <dc:date>2026-02-12T11:03:31Z</dc:date>
    <item>
      <title>Copying Saved Local Data Filter Script from to Data Table to Other Platforms</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-Saved-Local-Data-Filter-Script-from-to-Data-Table-to/m-p/930624#M108754</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two problems related to using the local data filter within JSL. I'm using JMP 17.&lt;/P&gt;
&lt;P&gt;I'm designing a script where a user is prompted to select from a list that gets passed to a local data filter within a Graph Builder object.&amp;nbsp; This part is fine but once the graph opens I want to save the local data filter to the main data table. The JMP log doesn't record this when I do it manually so I'm not what's the way script this. I've read the scripting index on the "Copy Local Data Filter()" and Paste Local Data Filter()" functions but not that's not exactly what I want. So my first problem is how does one save the local data filter script from a report window to the main data table?&lt;/P&gt;
&lt;P&gt;My second problem is how to reuse that filter. I have another script which creates a different report but will use the same local data filter. I've experimented with using Get Table Property() function on the saved Local Data Filter script but that doesn't seem to apply properly to the new report window.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand that consolidating the two scripts into one big script would solve my problems, however, I've separated it to simplify the user experience. It's not ideal but I think my idea could work but I've figure it out on my own. I would greatly appreciate if anyone could help me troubleshoot these problems.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Cathal&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/Car Poll.jmp" );

// First graph
obj1 = dt &amp;lt;&amp;lt; Distribution(
	Nominal Distribution( Column( :country ) ),
	Local Data Filter(
		Add Filter( columns( :sex ), Where( :sex == "Female" ) ),
		Mode( Show( 1 ), Include( 1 ) )
	)
);

// How to save "Local Data Filter" to data table?

// Manually add filter
dt &amp;lt;&amp;lt; New Script( "Local Data Filter",
Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ) )
);

// Second graph
obj2 = dt &amp;lt;&amp;lt; Distribution(
	Stack( 1 ),
	Nominal Distribution(
		Column( :marital status ),
		Horizontal Layout( 1 ),
		Vertical( 0 )
	),
);

// Get local data filter
filter = dt &amp;lt;&amp;lt; Get Table Property( "Local Data Filter" );&lt;BR /&gt;&lt;BR /&gt;//&amp;nbsp;How&amp;nbsp;to&amp;nbsp;apply&amp;nbsp;filter&amp;nbsp;to&amp;nbsp;obj2?&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2026 11:03:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-Saved-Local-Data-Filter-Script-from-to-Data-Table-to/m-p/930624#M108754</guid>
      <dc:creator>Cathal</dc:creator>
      <dc:date>2026-02-12T11:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Saved Local Data Filter Script from to Data Table to Other Platforms</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-Saved-Local-Data-Filter-Script-from-to-Data-Table-to/m-p/930634#M108755</link>
      <description>&lt;P&gt;One way&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );

// First graph
obj1 = dt &amp;lt;&amp;lt; Distribution(
	Nominal Distribution( Column( :country ) )
);

ldf = obj1 &amp;lt;&amp;lt; Local Data Filter(
	Add Filter( columns( :sex ), Where( :sex == "Female" ) ),
	Mode( Show( 1 ), Include( 1 ) )
);
ldf &amp;lt;&amp;lt; Save Script to Data Table("Local Data Filter");


obj2 = dt &amp;lt;&amp;lt; Distribution(
	Stack( 1 ),
	Nominal Distribution(
		Column( :marital status ),
		Horizontal Layout( 1 ),
		Vertical( 0 )
	),
);

ldf_script = dt &amp;lt;&amp;lt; Get Script("Local Data Filter");

Eval(EvalExpr(
	Send(obj2, Expr(Name Expr(ldf_script)));
));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Feb 2026 11:24:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-Saved-Local-Data-Filter-Script-from-to-Data-Table-to/m-p/930634#M108755</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-02-12T11:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Saved Local Data Filter Script from to Data Table to Other Platforms</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-Saved-Local-Data-Filter-Script-from-to-Data-Table-to/m-p/930672#M108759</link>
      <description>&lt;P&gt;Hi Jarmo, that works! Thanks a million :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2026 15:55:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-Saved-Local-Data-Filter-Script-from-to-Data-Table-to/m-p/930672#M108759</guid>
      <dc:creator>Cathal</dc:creator>
      <dc:date>2026-02-12T15:55:26Z</dc:date>
    </item>
  </channel>
</rss>

