I am an intermediate user and I am trying to create 50 columns with unique formulas based product specs.
I have succeesfuly created a strng variable withthe formula in it but I cannot get inot the column in a manner that works:
When I view the variable min_Form it shows the exact formula that I want to insert but when I inert it the column formula shows "min_form" and not the actual string that I was hoping for.
Any ideas on how to get the contents of the variable inserted instead of the variable name?
//Need to create formulas as character strings before inerting into formula field of new column
Minspec=char(":" || char(temp_Srow) || "_MinMarg");
maxspec=char(":" || char(temp_Srow) || "_MaxMarg");
min_Form="If(" || maxspec ||" < 0 | " || Minspec || " < 0,1,
// Max Only
if (is missing(temp_SpecMin),
dtMM<< New Column(Char(temp_Mcol() || "_Fail"),
matchflag = 1;
Break(); // Go to next spec
Thank you in advance,
Here's one way to do it. Basically you build the entire new column expression and run it through eval(parse()).
dt = open("$sample_data\big class.jmp");
my_formula = ":Age * :Height / :Weight";
new_column_expr = "dt << new column(\!"Test\!", numeric, continuous, formula(" || my_formula || "))";
I am almost done.
I can get the formula in now.
The last issue I am having is in formatting the text true result in my if statement:
="If(" || maxspec ||" < 0 | " || Minspec || " < 0," || temp_Srow || ",Empty());";
The issue is the caracter string temp_Srow.
I want it to show up as "Hi" in the results but it shows up as Hi without the quotes and when I use \! around it I get "temp_srow" in the formula result.