probably this script does the Job for you:
// generate a table
dt = New Table( "testdata",
add rows( 3 ),
New Column( "K36", Continuous, set values( [70, 80, 90] ) ),
New Column( "XA", Continuous, set values( [30, 32, 33] ) ),
New Column( "a1", Continuous, set values( [-50, -40, -30] ) ),
New Column( "A56", Continuous, set values( [10, 20, 10] ) )
);
// add a formula
dt << New Column( "f1", formula( :K36 >= 71.93 & :XA >= -32.3 & :a1 >= -43.67 & :A56 < 18.9 ) );
dt << run formulas;
// get formula, convert to string and split words
formula = dt:f1 << get formula;
formula_txt_words = Words( Char( Name Expr( formula ) ) );
// search for column names in words and put it into list
columns_lst = {};
For( i = 1, i <= N Arg( formula_txt_words ), i++,
If( Starts With( formula_txt_words[i], ":" ),
Insert Into( columns_lst, Substitute( formula_txt_words[i], ":", "" ) )
)
);
Show( columns_lst );
// Group columns
dt << group columns( "Cols used by f1", columns_lst );
// Column( "text" ) << deleteFormula;
Georg