using variable in conditional formula to create new data column<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />data table(dtname)<
Character, Nominal,
Formula( If( 0 < AColumnName< 100, "pass", "fail" ) ),
Lock( 1 )
);
In the script message above; is there a way to replace the constant limits (0 and 100) with variables that have pre-assigned values?
Re: using variable in conditional formula to create new data columnYes. You will need to preface the variable names with "::" so the column formula can see the values. For example:
lower_limit = 0;
upper_limit = 100;
data table(dtname) << New Column( "PassFail",
Character, Nominal,
Formula( If( ::lower_limit < AColumnName < ::upper_limit, "pass", "fail" ) ),
Lock( 1 )
);