<?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 Resolution Problem with Formula for Column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/900156#M106016</link>
    <description>&lt;P&gt;Both of these scripts do work fine for me&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

col_name_list = {};

dt = New Table("table",
	New Column("duration", Numeric, Continuous, Values([1]))
);


If(!Contains(col_name_list, "EFT (h)"),
	Current Data Table() &amp;lt;&amp;lt; New Column("EFT (h)",
		Numeric,
		Continuous,
		Format("Fixed Dec", 10, 1),
		Formula(:Name("duration") * 24)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Generally reformatting scripts should be able to capture most of the issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I would suggest not using Name() for cases like this (within formulas), unless you are on some much older version of JMP, as it has been replaced with ""n&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/18.2/#page/jmp/jsl-rules-for-names.shtml#ww258186" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; JSL Building Blocks &amp;gt; JSL Syntax Rules &amp;gt; JSL Rules for Names&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1757744574424.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82412i36E968299BE1229F/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1757744574424.png" alt="jthi_0-1757744574424.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Sep 2025 06:23:53 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-09-13T06:23:53Z</dc:date>
    <item>
      <title>how to Resolution Problem with Formula for Column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/899971#M106003</link>
      <description>&lt;P class="p1"&gt;Code:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(

!Contains(col_name_list, "EFT (h)"),

Current Data Table() &amp;lt;&amp;lt; New Column(

"EFT (h)",

Numeric,

Continuous,

Format("Fixed Dec", 10, 1),

Formula(

:Name( "duration" ) * 24

)

)

);



&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="p2"&gt;Error:&lt;/P&gt;
&lt;P class="p1"&gt;Unexpected ")". Perhaps there is a missing ";" or ",".&lt;/P&gt;
&lt;P class="p1"&gt;Line 9 Column 6:&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;))►)&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;The remaining text that was ignored was&lt;/P&gt;
&lt;P class="p1"&gt;)&lt;/P&gt;
&lt;P class="p1"&gt;Resolution Problem with Formula for Column EFT (h):&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;I am unable to figure out, what this could be.&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;I have tried this too:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(
	!Contains(col_name_list, "EFT (h)"),
	Current Data Table() &amp;lt;&amp;lt; New Column(
		"EFT (h)",
		Numeric,
		Continuous,
		Format("Fixed Dec", 10, 1),
		Formula(:duration * 24)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Sep 2025 09:36:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/899971#M106003</guid>
      <dc:creator>zetaVagabond1</dc:creator>
      <dc:date>2025-09-12T09:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to Resolution Problem with Formula for Column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/899981#M106004</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(
	!Contains(col_name_list, "EFT (h)"),
	Current Data Table() &amp;lt;&amp;lt; New Column(
		"EFT (h)",
		Numeric,
		Continuous,
		Format("Fixed Dec", 10, 1),
		Formula( 
		:Name( "EFT (h)" ) * 24 
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;using this&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 09:40:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/899981#M106004</guid>
      <dc:creator>zetaVagabond1</dc:creator>
      <dc:date>2025-09-12T09:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to Resolution Problem with Formula for Column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/899989#M106005</link>
      <description>&lt;P&gt;Please note that in the last version the column duration is replaced with column EFT(h).&lt;BR /&gt;To find issues with commas, you can double click on a bracket and the corresponding bracket will be marked as well - together with the enclosed script.&lt;BR /&gt;&lt;BR /&gt;Another option: use reformat script.&lt;BR /&gt;It works like executing the code: the syntax is checked and in case of an error the line of with the error will be indicated in the log.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1757672127191.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82343i1846622E7617ED43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1757672127191.png" alt="hogi_0-1757672127191.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Applying such checks, there are no issues with commas in your code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Besides manual checks, some automation will help. e.g. automatic coloring of the code, like suggested in this wish:&lt;BR /&gt;&lt;LI-MESSAGE title="Advanced syntax highlighting in JSL Editor - does the function evaluate its argument?" uid="729460" url="https://community.jmp.com/t5/JMP-Wish-List/Advanced-syntax-highlighting-in-JSL-Editor-does-the-function/m-p/729460#U729460" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 10:23:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/899989#M106005</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-09-12T10:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to Resolution Problem with Formula for Column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/899995#M106006</link>
      <description>&lt;P&gt;The most complicate issue with unbalanced brackets:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;for ( i=1, i &amp;lt; 10, i++, 
	list = { A, B, C ;
	E+F;
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1757674207545.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82344i584117159784EB34/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1757674207545.png" alt="hogi_0-1757674207545.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;... the issues with "balanced" brackets.&lt;BR /&gt;When you position the cursor behind the closing bracket, it shows the corresponding opening bracket:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1757674420131.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82346i53F0B5518F1AA706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1757674420131.png" alt="hogi_1-1757674420131.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, everything OK? Why the error message abut the closing ")"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP has a hint:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_2-1757674445786.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82347i506C62EC0C17034F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_2-1757674445786.png" alt="hogi_2-1757674445786.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, let's check the curly brackets ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Interesting, in your case the suggestion was:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_3-1757674546211.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82348i2E9E1397C1776EB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_3-1757674546211.png" alt="hogi_3-1757674546211.png" /&gt;&lt;/span&gt;&lt;BR /&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 10:58:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/899995#M106006</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-09-12T10:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to Resolution Problem with Formula for Column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/900156#M106016</link>
      <description>&lt;P&gt;Both of these scripts do work fine for me&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

col_name_list = {};

dt = New Table("table",
	New Column("duration", Numeric, Continuous, Values([1]))
);


If(!Contains(col_name_list, "EFT (h)"),
	Current Data Table() &amp;lt;&amp;lt; New Column("EFT (h)",
		Numeric,
		Continuous,
		Format("Fixed Dec", 10, 1),
		Formula(:Name("duration") * 24)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Generally reformatting scripts should be able to capture most of the issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I would suggest not using Name() for cases like this (within formulas), unless you are on some much older version of JMP, as it has been replaced with ""n&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/18.2/#page/jmp/jsl-rules-for-names.shtml#ww258186" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; JSL Building Blocks &amp;gt; JSL Syntax Rules &amp;gt; JSL Rules for Names&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1757744574424.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82412i36E968299BE1229F/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1757744574424.png" alt="jthi_0-1757744574424.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Sep 2025 06:23:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/900156#M106016</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-09-13T06:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to Resolution Problem with Formula for Column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/900315#M106030</link>
      <description>&lt;P&gt;Thanks, I check for the formatting, it seems fine. I am unable to locate this error.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Unexpected ")". Perhaps there is a missing ";" or ",".

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To give some context, the script I am working on is a legacy script written in previous JMP version 14/15 maybe. This works for the purpose it's designed. Now, I am re-purposing it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wasn't aware of using Name(), you suggest I should just use column-name directly, perhaps like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

col_name_list = {};

dt = New Table("table",
	New Column("duration", Numeric, Continuous, Values([1]))
);


If(!Contains(col_name_list, "EFT (h)"),
	Current Data Table() &amp;lt;&amp;lt; New Column("EFT (h)",
		Numeric,
		Continuous,
		Format("Fixed Dec", 10, 1),
		Formula(:duration * 24)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or duration * 24.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very new to this. Would it be easier to repurpose this whole bunch of code in python? Would then I still have to define all the column parameters like - type, formats, modeling type? Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 03:38:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/900315#M106030</guid>
      <dc:creator>zetaVagabond1</dc:creator>
      <dc:date>2025-09-15T03:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to Resolution Problem with Formula for Column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/900316#M106031</link>
      <description>&lt;P&gt;Thanks, I shall check this link. I do not know these yet.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 03:49:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/900316#M106031</guid>
      <dc:creator>zetaVagabond1</dc:creator>
      <dc:date>2025-09-15T03:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to Resolution Problem with Formula for Column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/901077#M106050</link>
      <description>&lt;P&gt;Without seeing the script it is difficult to say what could be the problem, as the scripts you have provided to work just fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there specific reason to rewrite it in Python? If it is going to be still used within JMP, I would not use Python (most of the time) to do tasks which could be also done with JSL.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2025 08:59:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-Resolution-Problem-with-Formula-for-Column/m-p/901077#M106050</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-09-16T08:59:47Z</dc:date>
    </item>
  </channel>
</rss>

