<?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: JMP Scripting - New Column Function and Multiple Formula Functions Don't MIX !!!! Interesting Problem !!!! in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-Scripting-New-Column-Function-and-Multiple-Formula-Functions/m-p/423524#M67258</link>
    <description>&lt;P&gt;A formula column can only have one formula. Usually the formula uses values of other columns on the same row to produce a value.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Oct 2021 00:13:34 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2021-10-05T00:13:34Z</dc:date>
    <item>
      <title>JMP Scripting - New Column Function and Multiple Formula Functions Don't MIX !!!! Interesting Problem !!!!</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-Scripting-New-Column-Function-and-Multiple-Formula-Functions/m-p/423521#M67257</link>
      <description>&lt;P&gt;Hello Community&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written a script in which I search an open data table for rows which contain text A in column 2 AND text B in column 3.&amp;nbsp; Using the row numbers, I then save the text from column 7 for all of those rows to a new individual variable.&amp;nbsp; The problem is I would like to then save the text in column 7 for all those rows in a NewTable with a New Column.&amp;nbsp; The first column was not a problem as I just list the pairs of texts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I am having a lot of trouble making a New Column containing the text for column 7 of the identified rows.&amp;nbsp; Its something like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Col 2 Col3 ..... Col7&lt;/P&gt;
&lt;P&gt;Hair&amp;nbsp; &amp;nbsp;Red&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Pass&lt;/P&gt;
&lt;P&gt;Hair&amp;nbsp; &amp;nbsp;Blue&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Pass&lt;/P&gt;
&lt;P&gt;Clown Sad&amp;nbsp; &amp;nbsp; &amp;nbsp; Pass&lt;/P&gt;
&lt;P&gt;Clown Joke&amp;nbsp; &amp;nbsp; &amp;nbsp;Fail&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;A= dt &amp;lt;&amp;lt; get rows where(contains(as column(2),"Hair")
&amp;amp; (contains(as column(3),"Red");

B= dt &amp;lt;&amp;lt; get rows where(contains(as column(2),"Clown")
&amp;amp; (contains(as column(3),"Joke");

HairPassFail = (column(7)[A]);

ClownPassFail = (column(7)[B]);

New Table( "Table",Add Rows( 2 ),
      New Column( "TextPairs",Character,"Nominal",
                 Set Values({"Hair-Red","Clown-Joke"})),
      New Column( "PASS/FAIL",continuous,"Nominal", formula(HairPassFail),formula(ClownPassFail))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When I show Hair and ClownPassFail, they output the text Pass and Fail respectively. My problem is that as I add new formulas into the New Column for each corresponding rows from the first new colum, the entire column gets overwritten. This is in 10 conditions now 2 for simplicity. So in this example, the output would be&lt;/P&gt;
&lt;P&gt;Col1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Col2&lt;/P&gt;
&lt;P&gt;Hair-Red&amp;nbsp; &amp;nbsp; &amp;nbsp;Fail&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Clown-Joke Fail&lt;/P&gt;
&lt;P&gt;Instead of Hair-Red Pass.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have any advice as to how I can create a new column where each successive value is a unique formula variable from the series of rows ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There must be a much easier way to do this I'm sure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks !!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:37:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-Scripting-New-Column-Function-and-Multiple-Formula-Functions/m-p/423521#M67257</guid>
      <dc:creator>SMW</dc:creator>
      <dc:date>2023-06-10T23:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: JMP Scripting - New Column Function and Multiple Formula Functions Don't MIX !!!! Interesting Problem !!!!</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-Scripting-New-Column-Function-and-Multiple-Formula-Functions/m-p/423524#M67258</link>
      <description>&lt;P&gt;A formula column can only have one formula. Usually the formula uses values of other columns on the same row to produce a value.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 00:13:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-Scripting-New-Column-Function-and-Multiple-Formula-Functions/m-p/423524#M67258</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-10-05T00:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: JMP Scripting - New Column Function and Multiple Formula Functions Don't MIX !!!! Interesting Problem !!!!</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-Scripting-New-Column-Function-and-Multiple-Formula-Functions/m-p/423818#M67298</link>
      <description>&lt;P&gt;You can just built your textpairs column by doing a concatenation of the first two columns. Then for your Pass/fail column you can built an if statement looking at the texpairs column and if the textparis row matches a condition, copy pass/fail column in the cell. Does this need to be scripting or would simple column formulas suffice? if so, share a part of your data table.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 09:20:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-Scripting-New-Column-Function-and-Multiple-Formula-Functions/m-p/423818#M67298</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2021-10-06T09:20:05Z</dc:date>
    </item>
  </channel>
</rss>

