<?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 Collection of good/valuable scripting examples the scripters club would like to be added to the scripting index examples in JMP Scripters Club Discussions</title>
    <link>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842828#M215</link>
    <description>&lt;P&gt;In our last session the idea came up to collect good examples which may be good candidates to be added to the scripting index in JMP as examples.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please add in the comments section your ideas with links to community posts or just adding the code as example in the comments. Be sure to specify what function the example is related to (where you would like to see this example!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We will provide all suggestions to our support team and therefore to the developers, so they can consider adding at least some of them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actions:&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add your suggestions in the comment field&lt;/LI&gt;
&lt;LI&gt;kudo the ones you liked to be added&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;The least we get is a valuable list of example in this post, which by itself should already be very helpful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2025 15:05:40 GMT</pubDate>
    <dc:creator>martindemel</dc:creator>
    <dc:date>2025-02-19T15:05:40Z</dc:date>
    <item>
      <title>Collection of good/valuable scripting examples the scripters club would like to be added to the scripting index examples</title>
      <link>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842828#M215</link>
      <description>&lt;P&gt;In our last session the idea came up to collect good examples which may be good candidates to be added to the scripting index in JMP as examples.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please add in the comments section your ideas with links to community posts or just adding the code as example in the comments. Be sure to specify what function the example is related to (where you would like to see this example!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We will provide all suggestions to our support team and therefore to the developers, so they can consider adding at least some of them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actions:&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add your suggestions in the comment field&lt;/LI&gt;
&lt;LI&gt;kudo the ones you liked to be added&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;The least we get is a valuable list of example in this post, which by itself should already be very helpful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 15:05:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842828#M215</guid>
      <dc:creator>martindemel</dc:creator>
      <dc:date>2025-02-19T15:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of good/valuable scripting examples the scripters club would like to be added to the scripting index examples</title>
      <link>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842868#M216</link>
      <description>&lt;P&gt;For &lt;FONT face="courier new,courier"&gt;New Column()&lt;/FONT&gt; &amp;amp; &amp;lt;&amp;lt;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Set Property()&lt;/FONT&gt;, please add a Link to&amp;nbsp;&lt;BR /&gt;&lt;LI-MESSAGE title="Writing JSL code dynamically" uid="820931" url="https://community.jmp.com/t5/JMPer-Cable/Writing-JSL-code-dynamically/m-p/820931#U820931" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;BR /&gt;[alternatively, one could add the link to Substitute and Expr.&lt;BR /&gt;The problem: Just user who know the answer will find the answer]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);

// Open a sample data table
dt = Open("$SAMPLE_DATA/Cleansing.jmp");

// Values previously obtained from a lookup table and assigned to variables as:
myLSL = 6;
myUSL = 8;
myTarget = 7;

// Use the variables to set the spec limits column property
Eval(Eval Expr(
    Column(dt, "pH") &amp;lt;&amp;lt; Set Property(
        "Spec Limits",
        {LSL( Expr(myLSL) ), USL( Expr(myUSL) ), Target( Expr(myTarget) ), Show Limits( 1 )}
    );
));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2025 15:20:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842868#M216</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-02-19T15:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of good/valuable scripting examples the scripters club would like to be added to the scripting index examples</title>
      <link>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842890#M217</link>
      <description>&lt;P&gt;I always forget how Eval(), Eval Expr() and Expr() work together, so I have &lt;A href="https://community.jmp.com/t5/JSL-Cookbook-Archived/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/ta-p/48998" target="_self"&gt;this page&lt;/A&gt; bookmarked, and I specifically use this bit of JSL from the linked page:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Eval Expr
For( i = 1, i &amp;lt;= N Items(cols), i++,
       Eval( Eval Expr(
              dt &amp;lt;&amp;lt; New Column( 
                    "2 * " || Char( cols[i] ),
                    Numeric,
                    "Continuous",
                    Formula( As Column( Expr( Char( cols[i] ) ) ) * 2)
              )
       ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2025 15:57:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842890#M217</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2025-02-19T15:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of good/valuable scripting examples the scripters club would like to be added to the scripting index examples</title>
      <link>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842898#M218</link>
      <description>&lt;P&gt;For&amp;nbsp;&lt;CODE class=" language-jsl"&gt;Get Environment Variable():&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;uname = Get Environment Variable( "USERNAME" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;from:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Discussions/computer-name/m-p/753036/highlight/true#M93482" target="_blank"&gt;https://community.jmp.com/t5/Discussions/computer-name/m-p/753036/highlight/true#M93482&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 17:11:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842898#M218</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-02-19T17:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of good/valuable scripting examples the scripters club would like to be added to the scripting index examples</title>
      <link>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842899#M219</link>
      <description>&lt;P&gt;In the description of &lt;FONT face="courier new,courier"&gt;for&lt;/FONT&gt; loops, add a link to data table indexing, e.g. :&lt;BR /&gt;&lt;A href="https://community.jmp.com/t5/Uncharted/Data-table-subscripting/ba-p/21013" target="_blank" rel="noopener"&gt;https://community.jmp.com/t5/Uncharted/Data-table-subscripting/ba-p/21013&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 17:13:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842899#M219</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-02-19T17:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of good/valuable scripting examples the scripters club would like to be added to the scripting index examples</title>
      <link>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842901#M220</link>
      <description>&lt;DIV&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;I have the same trick for Eval(), Substitute(), Expr(), in particular a series of examples when it comes to columns.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Tablet Production.jmp");
ColList = dt &amp;lt;&amp;lt; Get Column Names( Continuous );

// New column
For( i = 1, i &amp;lt;= N Items( colList ), i++,
	Eval(Substitute(								
		Expr(										
			newCol = dt &amp;lt;&amp;lt; New Column( 
				col_Name,							
				Numeric,
				"Continuous", 
				Format( "Percent", 12, 2 ),
				Formula(As Column(col1) / Col_Mean	)); 	),
		Expr(col_Name), "Ratio " || Char(colList[i]) || " vs. Col Mean",					
		Expr(col1),Column(dt,ColList[i]),
		Expr(Col_Mean), Col mean(Column(dt,ColList[i])) 
)));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Feb 2025 17:23:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Collection-of-good-valuable-scripting-examples-the-scripters/m-p/842901#M220</guid>
      <dc:creator>Emmanuel_Romeu</dc:creator>
      <dc:date>2025-02-19T17:23:41Z</dc:date>
    </item>
  </channel>
</rss>

