<?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: how to add a new formula  with JSL？ in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38829#M22710</link>
    <description>&lt;P&gt;Your formula involves division. It requires numeric data columns for this compuation. Your result is set up for a new column with the character data type. If that is what you want, then wrap the division inside the Char() function to satisfy the data type.&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2017 14:16:48 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2017-05-04T14:16:48Z</dc:date>
    <item>
      <title>how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38670#M22630</link>
      <description>all i use the samlpe which named&amp;nbsp; thickness.JMP to produce a new file &amp;nbsp;by summary。 &amp;nbsp; but i don not know to&amp;nbsp;how to add one formula &amp;nbsp;with JSL in summary table。</description>
      <pubDate>Mon, 01 May 2017 07:37:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38670#M22630</guid>
      <dc:creator>TONYMA</dc:creator>
      <dc:date>2017-05-01T07:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38671#M22631</link>
      <description />
      <pubDate>Mon, 01 May 2017 07:39:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38671#M22631</guid>
      <dc:creator>TONYMA</dc:creator>
      <dc:date>2017-05-01T07:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38672#M22632</link>
      <description />
      <pubDate>Mon, 01 May 2017 07:40:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38672#M22632</guid>
      <dc:creator>TONYMA</dc:creator>
      <dc:date>2017-05-01T07:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38699#M22646</link>
      <description>&lt;P&gt;To create the summary table first and then add a formula column to it, save a reference to the table when you create it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Save reference to the newly created summary table.
dt = Data Table( "Thickness" ) &amp;lt;&amp;lt; Summary( Group( :Bar ), N, Mean( :Thickness 01 ) );

//Send a message to the new table to create the new column.
dt &amp;lt;&amp;lt;  New Column( "New formula column",
	Character,
	Formula( 
		If( :Name( "Mean(Thickness 01)" ) &amp;gt; 0.04,
			"normal",
			"thin"
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 May 2017 18:40:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38699#M22646</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-05-01T18:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38825#M22707</link>
      <description>i want to calculate " Thickness 01/N rows ". JSL is below, that is right? dt &amp;lt;&amp;lt; New Column( "New formula column", Character, Formula( :Name( "Thickness 01) / :Name( "N rows"));</description>
      <pubDate>Thu, 04 May 2017 13:38:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38825#M22707</guid>
      <dc:creator>TONYMA</dc:creator>
      <dc:date>2017-05-04T13:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38829#M22710</link>
      <description>&lt;P&gt;Your formula involves division. It requires numeric data columns for this compuation. Your result is set up for a new column with the character data type. If that is what you want, then wrap the division inside the Char() function to satisfy the data type.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 14:16:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/38829#M22710</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-05-04T14:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/108924#M39564</link>
      <description>&lt;P&gt;I am stuck with a simialr issue. I perform division operation in one column and then need to transpose the table.Running into issue while I try to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtIn &amp;lt;&amp;lt; New Column("Max Size ",Character,format("best",8),Formula(
:Name("Max Size") = (2500/:Min Size))
);


//check for empty columns and delete if any
dt = Current Data Table();
names = dt &amp;lt;&amp;lt; Get Column Names();
dt1 = dt &amp;lt;&amp;lt; Missing Data Pattern(columns(Eval(names)), invisible);
n = N Row(dt1);
For(i = N Col(dt), i &amp;gt;= 1, i--,
If(Col Sum(Column(dt1, i + 3)) &amp;lt; n,
Remove From(names, i)
)
);
Try(dt &amp;lt;&amp;lt; delete columns(names));
Close(dt1, nosave);
//Get all coulmn names
allcolnames = dt &amp;lt;&amp;lt; get column names(string);
show(allcolnames);
for (i = 1, i &amp;lt;= nitems(allcolnames), i++,
column(dt, allcolnames[i]) &amp;lt;&amp;lt; data type(Character,"Nominal");
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But getting an error becuase of the formula -&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Cannot convert argument to a number [or matrix] 1 times At rows: 2 Operation: Divide, 2500 / /*###*/:Min Size/*###*/&lt;BR /&gt;Formula evaluation errors have been ignored&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 20:25:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/108924#M39564</guid>
      <dc:creator>ENTHU</dc:creator>
      <dc:date>2019-02-05T20:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/108925#M39565</link>
      <description>&lt;P&gt;I am assuming that you have a pointer to your data table called&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; dtInput&lt;/P&gt;
&lt;P&gt;but not one called&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; dtIn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 19:59:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/108925#M39565</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-02-05T19:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to add a new formula  with JSL？</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/108927#M39566</link>
      <description>That's a typo. I have pointer to data table called dtIn.</description>
      <pubDate>Tue, 05 Feb 2019 20:26:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-add-a-new-formula-with-JSL/m-p/108927#M39566</guid>
      <dc:creator>ENTHU</dc:creator>
      <dc:date>2019-02-05T20:26:15Z</dc:date>
    </item>
  </channel>
</rss>

