Comparing strings not working for variablesHi, I am using JMP 15 on Mac. The following code works:
dt = current data table();
Current Data Table() << Row Selection(
Select where( (:Stat == "Max"), Current Selection( Extend ))
);
But this doesn't:
dt = current data table();
Current Data Table() << Row Selection(
var = "Max"
Select where( (:Stat == var), Current Selection( Extend ))
);
Can someone explains what is wrong with the second one?
ScriptingRe: Comparing strings not working for variablesTry moving var = "Max" outside the << Row Selection(). And add missing ;
Re: Comparing strings not working for variablesNo change (thanks for your reply though).
Re: Comparing strings not working for variablesOk I solved it. This is what was missing:
(:Stat == (myStat))
So, the variable needs to be inside two parentheses!