how to Resolution Problem with Formula for ColumnCode:
If(
!Contains(col_name_list, "EFT (h)"),
Current Data Table() << New Column(
"EFT (h)",
Numeric,
Continuous,
Format("Fixed Dec", 10, 1),
Formula(
:Name( "duration" ) * 24
)
)
);
Error:
Unexpected ")". Perhaps there is a missing ";" or ",".
Line 9 Column 6: ))►)
The remaining text that was ignored was
)
Resolution Problem with Formula for Column EFT (h):
I am unable to figure out, what this could be.
I have tried this too:
If(
!Contains(col_name_list, "EFT (h)"),
Current Data Table() << New Column(
"EFT (h)",
Numeric,
Continuous,
Format("Fixed Dec", 10, 1),
Formula(:duration * 24)
)
);Automation and ScriptingData AccessData Blending and CleanupRe: how to Resolution Problem with Formula for ColumnIf(
!Contains(col_name_list, "EFT (h)"),
Current Data Table() << New Column(
"EFT (h)",
Numeric,
Continuous,
Format("Fixed Dec", 10, 1),
Formula(
:Name( "EFT (h)" ) * 24
)
)
);
using this
Re: how to Resolution Problem with Formula for ColumnPlease note that in the last version the column duration is replaced with column EFT(h).
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.
Another option: use reformat script.
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.

Applying such checks, there are no issues with commas in your code.
Besides manual checks, some automation will help. e.g. automatic coloring of the code, like suggested in this wish:
Advanced syntax highlighting in JSL Editor - does the function evaluate its argument?
Re: how to Resolution Problem with Formula for ColumnThe most complicate issue with unbalanced brackets:
for ( i=1, i < 10, i++,
list = { A, B, C ;
E+F;
);

... the issues with "balanced" brackets.
When you position the cursor behind the closing bracket, it shows the corresponding opening bracket:

So, everything OK? Why the error message abut the closing ")"?
JMP has a hint:

So, let's check the curly brackets ...
Interesting, in your case the suggestion was:

?
Re: how to Resolution Problem with Formula for ColumnBoth of these scripts do work fine for me
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() << New Column("EFT (h)",
Numeric,
Continuous,
Format("Fixed Dec", 10, 1),
Formula(:Name("duration") * 24)
)
);
Generally reformatting scripts should be able to capture most of the issues.
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
Scripting Guide > JSL Building Blocks > JSL Syntax Rules > JSL Rules for Names

Re: how to Resolution Problem with Formula for ColumnThanks, I check for the formatting, it seems fine. I am unable to locate this error.
Unexpected ")". Perhaps there is a missing ";" or ",".
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.
I wasn't aware of using Name(), you suggest I should just use column-name directly, perhaps like
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() << New Column("EFT (h)",
Numeric,
Continuous,
Format("Fixed Dec", 10, 1),
Formula(:duration * 24)
)
);
or duration * 24.
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
Re: how to Resolution Problem with Formula for ColumnThanks, I shall check this link. I do not know these yet.
Re: how to Resolution Problem with Formula for ColumnWithout seeing the script it is difficult to say what could be the problem, as the scripts you have provided to work just fine.
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.