I am in the beginnings of making a script to find the delta between two measurements for many columns.
I am having difficulty making column formulas when the column name has a dash....
The parse command to remove quotes changes the dash to a minus operand which then messes with what I am trying to accomplish.
Error log:
Unexpected "_92MHz_test_data". Perhaps there is a missing ";" or ",".
Here is the script (which works if the column(s) do not have an operand in the name.
E.g.,
dt = Current Data Table();
Col_Name = "diff"; // column(5) - Column(300)
Col_Name1_char = Char( Column Name( 5 ) ); // "bin of DWK112079-01_92MHz_test_data""
Col_Name2_char = Char( Column Name( 300 ) );// "bin of DWK112079-01_90MHz_test_data""
Col1_Name = (Concat( ":", (Col_Name1_char) )); //":bin of DWK112079-01_92MHz_test_data";
Col2_Name = ((Concat( ":", Col_Name2_char ))); // ":bin of DWK112079-01_90MHz_test_data";
Formula_I = ((Concat( col1_Name, " - ", Col2_Name ))); //Make the formula expression
a = Expr(
New Column( X, formula( Z ) )
); // New column with name Diff
b = Substitute( Name Expr( a ), Expr( X ), Col_Name, Expr( Z ), Parse( Formula_I ) ); // This has error when Colnames has "-" in the name
Eval( b );
//Note:
Show( Forumula_I, Parse( Formula_I ) );
//Note : Formula_I = ":bin of DWK112079-01_92MHz_test_data - :bin of DWK112079-01_new_updated_test_data";
//Note Parse(formula_I) = :bin of DWK112079 - 1; This is not what I want