<?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: JSL how to launch JMP platforms with pre-defined selections/options? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-how-to-launch-JMP-platforms-with-pre-defined-selections/m-p/544410#M76324</link>
    <description>&lt;P&gt;My guess is that the closest 'out of the box' functionality is &lt;STRONG&gt;Cols&amp;gt; Preselect Role&lt;/STRONG&gt; and the scripted equivalent&amp;nbsp;&lt;STRONG&gt;&amp;lt;&amp;lt; Preselect Role&lt;/STRONG&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 12:59:46 GMT</pubDate>
    <dc:creator>David_Burnham</dc:creator>
    <dc:date>2022-09-14T12:59:46Z</dc:date>
    <item>
      <title>JSL how to launch JMP platforms with pre-defined selections/options?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-how-to-launch-JMP-platforms-with-pre-defined-selections/m-p/544344#M76319</link>
      <description>&lt;P&gt;Is there any "good" options for running JMP platforms with prefilled options, such as column selections. Below are two options that came to my mind.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First option is "building" the platform window and then selecting columns from table and pressing button to add those columns.&lt;/P&gt;
&lt;P&gt;Second option is first running the platform with JSL script and then &amp;lt;&amp;lt; Relaunch Analysis to open the window "prefilled".&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Probe.jmp");

col_list = dt &amp;lt;&amp;lt; get Column names(continuous, string);
wait(0);

//Option1
start = HP Time();
dt &amp;lt;&amp;lt; Select Columns(col_list);
nw_eo = New window("Multivariate and Correlations", &amp;lt;&amp;lt; Show Menu(0), &amp;lt;&amp;lt; Show Toolbars(0),
		Platform(dt, Multivariate())
	, &amp;lt;&amp;lt; Set Window Icon("ScatterplotMatrix")
);
xpath_path = "//ButtonBox[@title='Y, Columns']";
btn_ref = (nw_eo &amp;lt;&amp;lt; XPath(xpath_path))[1];
btn_ref &amp;lt;&amp;lt; Click(1);
dt &amp;lt;&amp;lt; Clear Column Selection;
Show(HP Time()-start);

// Option2
start = HP Time();
ps = dt &amp;lt;&amp;lt; Multivariate(
	Y(Eval(col_list)),
	Scatterplot Matrix(0),
	invisible,
	&amp;lt;&amp;lt; Relaunch Analysis,
	&amp;lt;&amp;lt; Close Window
);
Show(HP Time()-start);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Edit: Slight updates to example script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:58:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-how-to-launch-JMP-platforms-with-pre-defined-selections/m-p/544344#M76319</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-06-09T15:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: JSL how to launch JMP platforms with pre-defined selections/options?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-how-to-launch-JMP-platforms-with-pre-defined-selections/m-p/544410#M76324</link>
      <description>&lt;P&gt;My guess is that the closest 'out of the box' functionality is &lt;STRONG&gt;Cols&amp;gt; Preselect Role&lt;/STRONG&gt; and the scripted equivalent&amp;nbsp;&lt;STRONG&gt;&amp;lt;&amp;lt; Preselect Role&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 12:59:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-how-to-launch-JMP-platforms-with-pre-defined-selections/m-p/544410#M76324</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2022-09-14T12:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: JSL how to launch JMP platforms with pre-defined selections/options?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-how-to-launch-JMP-platforms-with-pre-defined-selections/m-p/544415#M76329</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4536"&gt;@David_Burnham&lt;/a&gt; thanks! Preselect roles seem to be working quite well if only column changes are needed (luckily, in my case no changes to options are needed):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Probe.jmp");

col_list = dt &amp;lt;&amp;lt; get Column names(continuous, string);
wait(0);

//Option3
start = HP Time();
old_roles = Associative Array();
For Each({col_name}, col_list,
	old_roles[col_name] = Column(dt, col_name) &amp;lt;&amp;lt; Get Role;
	Column(dt, col_name) &amp;lt;&amp;lt; Preselect Role("Y");
);
dt &amp;lt;&amp;lt; Multivariate();
For Each({{col_name, role}}, old_roles,
	If(role == "None",
		role = "No Role";
	);
	Column(dt, col_name) &amp;lt;&amp;lt; Preselect Role(role);
);
Show(HP Time()-start);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Sep 2022 13:39:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-how-to-launch-JMP-platforms-with-pre-defined-selections/m-p/544415#M76329</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-09-14T13:39:36Z</dc:date>
    </item>
  </channel>
</rss>

