cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

New Formula Column - new option: just calculate

☑ cool new feature
☑ could help many users!

☐ removes a „bug“

☐ nice to have

☐ nobody needs it

 

What inspired this wish list request? 

The New Formula column submenu in the column right click context menu is very useful to quickly generate new formula columns.

But: Often a user just wants to get a column with the values, without the need of a formula column.

compare the options of Recode:

hogi_1-1673599964109.png

 

 

What is the improvement you would like to see? 

Please add an option to the New Formula right click context menu, allowing the user to toggle between

- Formula Column and

- New Column (just calculate).

A third option could be:

- Formula Column (1x) like it is implemented in the Normalize Function of the QuickSelect Toolbar  :
This way a Formula Column is added to the table, but the evaluation is disabled after a first calculation.

hogi_3-1673600428400.png

 

hogi_2-1673600137121.png

 

Why is this idea important?

With the additional option available, a user can generate "pre-calculated" columns as easy as he can generate formula culumns.

The third option would allow the user to generate a pre-calculated (non updating column) with the additional benefit that the calculation is stored/freezed - ideal for documentation, and with the possibility to reactivate it.

 

 

 

 

more wishes submitted by  hogi_2-1702196401638.png

 

6 Comments
jthi
Super User

Evaluate Once option should in my opinion be added to jsl and maybe even the non-formula version. We already have it with << Set Each Value but most of the people have no idea that it should be used instead of formula if you have no need for formula

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

// "New Column" already exists with jsl
new_col1 = dt << New Column("X", Numeric, Continuous, << Set Each Value(:height*:weight));

// Evaluate once kinda does, but it requires few commands
new_col2 = dt << New Column("X", Numeric, Continuous, Formula(:height*:weight));
new_col2 << Suppress Eval(1);

// Formula isn't evaluated 
new_col3 = dt << New Column("X", Numeric, Continuous, Formula(:height*:weight), << Suppress Eval(1));

// won't get reference
new_col4 = (dt << New Column("X", Numeric, Continuous, Formula(:height*:weight))) << Suppress Eval(1);

show(new_col1,new_col2,new_col3,new_col4);

 

 

hogi
Level XI

Hi @jthi - thank you for supporting this wish 

 

I feared that one even has to put some 

wait()

between the column generation and the 

Suppress Eval(1)

If the calculation takes too long, the suppress Eval could interrupt it?

 

But doesn't seem so - I also checked for larger tables.

Nevertheless, would be nice to have the one-time-eval available

jthi
Super User

When waiting for formulas to evaluate you shouldn't trust wait and it is almost always better to use <<Run Formulas (it should evaluate all pending formulas).

jthi
Super User

This option is "already offered" in Formula Editor. If you go to top right corner and select Suppress Eval:

jthi_1-1674374289177.png

 

and then you press OK/Apply you are given these options:

jthi_0-1674374257822.png

 

Captured action seems to only have Suppress Eval

Data Table("Subset of Big Class") << New Column("Column 6",
	Numeric,
	"Continuous",
	Format("Best", 12),
	Formula(:height * :weight),
	Suppress Eval
);
hogi
Level XI

With "this option" you refer to ...?

Status changed to: Acknowledged

Hi @hogi, thank you for your suggestion! We have captured your request and will take it under consideration.