cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

How to determine a column has formula?

I would like to remove all formulas from all columns with script. I wrote a forloop but whether a column has formula needs to be determined. How to do that with scripts?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to determine a column has formula?

One option is to use <<Get Formula with Is Empty()

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
col1 = dt << New Column("Ratio", Numeric, Continuous);
col1 << Formula(:height / :weight);
wait(1);

For Each({col_name}, dt << Get Column Names("String"),
	col = Column(dt, col_name);
	If(!Is Empty(col << get formula),
		Column(dt, col_name) << Delete Formula
	);
);

Scripting Index has a lot of information and you can find it directly from JMP's menu Help / Scripting Index

jthi_0-1670526823473.png

If you add those formulas yourself and don't really need them for formula usage, you can avoid adding them all together by using << Set Each Value()

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: How to determine a column has formula?

One option is to use <<Get Formula with Is Empty()

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
col1 = dt << New Column("Ratio", Numeric, Continuous);
col1 << Formula(:height / :weight);
wait(1);

For Each({col_name}, dt << Get Column Names("String"),
	col = Column(dt, col_name);
	If(!Is Empty(col << get formula),
		Column(dt, col_name) << Delete Formula
	);
);

Scripting Index has a lot of information and you can find it directly from JMP's menu Help / Scripting Index

jthi_0-1670526823473.png

If you add those formulas yourself and don't really need them for formula usage, you can avoid adding them all together by using << Set Each Value()

-Jarmo

Re: How to determine a column has formula?

It worked!

Thank you so much!

Recommended Articles