Hi,
I am trying to add a script to a data table that will allow the user to parse a given given column (:File Name) by delimiters which the user will select by a display box (delim). Ideally, the formula will continue to parse the :File Name column until there is nothing left to parse. A block of my script is below. In it, I create a new column (col) for each parsed segment of :File Name. I then check col for missing values and then stop if the entire column is empty.
My problem is that I can not get col to evaluate in the formula. I have even tried using MS 's Eval(Parse(Eval Insert())) trick, but I can not get it to work. Are there any suggestions? I am using JMP11.
Thanks!
// Example script.
// Note: col = Column( "Column 442" );
delim = "-";
i = 1;
j = 1;
While( j > 0,
j = 0;
col = dt << New Column();
col << Data Type( Character, Nominal );
col << Set Formula( Word( i, :File Name, delim ) );
For Each Row( If( Is Missing( :Column 442 ) == 0, j = j + 1 ) ); // This works.
Eval( Parse( Eval Insert( "For Each Row( If( Is Missing(:Column 442) == 0, j = j + 1 ) )" ) ) ); // This works.
Eval( Parse( Eval Insert( "For Each Row( If( Is Missing(^col^) == 0, j = j + 1 ) )" ) ) ); // This does not work.
Eval( Parse( Eval Insert( "For Each Row( If( Length(^col^) != 0, j = j + 1 ) )" ) ) ); // This does not work.
i = i + 1;
);