As @pauldeen pointed out you can profile this using expand intermediate formulas, but you can go one step further and use the save expanded formulas formulas option in that profiler to resolve all of those references in a new column formula.
For example:
Names Default To Here( 1 );
dt = Open( "$Sample_data/iris.jmp" );
dt << New Column("Log[Petal width]", Numeric, "Continuous", Format("Best", 12), Formula(Log(:Petal width)));
dt << New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Formula(:Sepal length + :Sepal width + :"Log[Petal width]"n));
prof = Profiler(
Y( :Column 1 ),
Profiler(
1,
Term Value(
Sepal length( 6, Lock( 0 ), Show( 1 ) ),
Sepal width( 3.125, Lock( 0 ), Show( 1 ) ),
Petal width( 1.269, Lock( 0 ), Show( 1 ) )
)
),
Expand
);
col = prof << Save Expanded Formulas;
If you want to do this by scripting you have several options. I would start with a for loop that would look for a column reference, check if that column has a formula, and then use the substitute command to insert it. Give it a try and post it here if you get stuck.