<?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: Copy Selected Column Values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709659#M89358</link>
    <description>&lt;P&gt;I am placing the resulting values in a script and it runs as intended, I could convert to an add-in also.&amp;nbsp; What I wasn't able to figure out was how to avoid manual activity in the first place.&amp;nbsp; At it's most basic, I was trying to replicate the Ctrl+C and Ctrl+V functions after having automatically created and selecting the columns.&amp;nbsp; Anything I find in the scripting langauge copies and pastes the formula rather than the values.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 14:45:51 GMT</pubDate>
    <dc:creator>SpannerHead</dc:creator>
    <dc:date>2023-12-15T14:45:51Z</dc:date>
    <item>
      <title>Copy Selected Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709534#M89345</link>
      <description>&lt;P&gt;I have a JMP table that contains categories, subcategories and spec limits that I need to reference in a data table.&amp;nbsp; I'm sure there are many ways to do this but I wrote formulas in two added columns that converts to a JMP script when the columns are selected and the values pasted into an empty JMP script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Added Column 1 contains the formula-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(Row() == 1,
	"dt=Current Data Table();"
)

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Added Column 2 contains the formula-&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;"Try(Eval(Eval Expr( :" || :Process || " &amp;lt;&amp;lt; Set Property( \!"Spec Limits\!", {LSL( "
|| Char( :LSL ) || " ), Target( " || Char( :Target ) || " ), USL( " || Char( :USL )
|| " ), Show Limits( 1 )} ))););";
"Try((Column(\!"" || :Process || "\!") &amp;lt;&amp;lt; Set Selected(1););dt &amp;lt;&amp;lt; group columns(\!""
|| :TYPE || "\!");dt &amp;lt;&amp;lt; deselect column group( \!"" || :TYPE || "\!" ););" ||
"Try(Eval(Eval Expr(:" || :Process || " &amp;lt;&amp;lt; Set Property(\!"Notes\!", \!"" ||
:Subgroup || "\!"))););";

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Process is the property name Column.&amp;nbsp; This will be coherent with the data column names in the data table.&lt;/P&gt;
&lt;P&gt;LSL is the lower spec limit Column.&lt;/P&gt;
&lt;P&gt;USL is the upper spec limit Column.&lt;/P&gt;
&lt;P&gt;Type is the group Column.&lt;/P&gt;
&lt;P&gt;Subgroup is the notes Column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to manually select the columns, do a copy and paste, which gives a working script.&amp;nbsp; To add the next layer of automation I wanted to have the script select and copy the values from the two target columns, open the script window and paste the content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where I'm stuck is on getting the script to copy and paste the values contained in the columns?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 05:32:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709534#M89345</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2023-12-15T05:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Selected Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709565#M89347</link>
      <description>&lt;P&gt;So you want to end up with an automatically-generated script in a new script window, right?&amp;nbsp; Can you post an example table to start with?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, the &amp;lt;JSL&amp;gt; button should be used when posting JSL code so it's easier to read and digest.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 22:41:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709565#M89347</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-12-14T22:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Selected Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709599#M89351</link>
      <description>&lt;P&gt;I think using Table Script or just JMP script file (.jsl) would make this easier (you can also make a toolbar/add-in if needed).&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 05:34:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709599#M89351</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-15T05:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Selected Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709659#M89358</link>
      <description>&lt;P&gt;I am placing the resulting values in a script and it runs as intended, I could convert to an add-in also.&amp;nbsp; What I wasn't able to figure out was how to avoid manual activity in the first place.&amp;nbsp; At it's most basic, I was trying to replicate the Ctrl+C and Ctrl+V functions after having automatically created and selecting the columns.&amp;nbsp; Anything I find in the scripting langauge copies and pastes the formula rather than the values.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 14:45:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709659#M89358</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2023-12-15T14:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Selected Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709661#M89360</link>
      <description>&lt;P&gt;First post from me sorry, for the confusion.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 14:47:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/709661#M89360</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2023-12-15T14:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Selected Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/714104#M89752</link>
      <description>&lt;P&gt;I had a discussion with one of my colleagues at work (thanks Tom) and we figured this out.&amp;nbsp; I need to drop the formula from the columns of interest and then do a copy and paste.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating the column, I add&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	Column( "Added Column") &amp;lt;&amp;lt; Delete Formula;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then I copy the contents, open a script window and paste the contents.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Current Data Table() &amp;lt;&amp;lt; Bring Window To Front;
Wait(0);
Main Menu("Copy");
ww=New Window( "Script", &amp;lt;&amp;lt;Script );
Wait(0);
Main Menu("Paste");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I might go back and delete the columns from the parent reference table since they're now redundant but that's just housekeeping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 15:58:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Selected-Column-Values/m-p/714104#M89752</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2024-01-08T15:58:04Z</dc:date>
    </item>
  </channel>
</rss>

