Currently Action Recorder creates fairly non-robust code by using table names and such. New Workflow Builder is able to offer reference replacements but I would like to go a bit further and have an option in which Action Recorder would use variable names. These should be configurable by user. Also namespace should be used in this case, either some specific one or here (add Names Default To Here(1); to top of script)
Below is fairly simple example created using Big Class and Enhanced Log
/*:
// Open Data Table: Big Class.jmp
// → Data Table("Big Class")
Open("/C:/Program Files/SAS/JMPPRO/16/Samples/Data/Big Class.jmp");
// New formula column: Log[weight+1]
Data Table("Big Class") << New Formula Column(
Operation(Category("Log"), "Log x+1"),
Columns(:weight)
);
// New formula column: Random Uniform
Data Table("Big Class") << New Formula Column(
Operation(Category("Random"), "Random Uniform"),
Columns(:sex, :height)
);
// Report snapshot: Big Class - Graph Builder
Data Table("Big Class") << Graph Builder(
Size(528, 448),
Show Control Panel(0),
Variables(X(:sex), Y(:"Log[weight+1]"n)),
Elements(Points(X, Y, Legend(4)))
);
It would be nice if this could be written in log as (this won't work as it seems like << New Formula Column doesn't return reference to the column like << New Column does, but the idea is still the same)
// Open Data Table: Big Class.jmp
// → Data Table("Big Class")
dt_1 = Open("/C:/Program Files/SAS/JMPPRO/16/Samples/Data/Big Class.jmp");
// New formula column: Log[weight+1]
col_1 = dt_1 << New Formula Column(
Operation(Category("Log"), "Log x+1"),
Columns(:weight)
);
// New formula column: Random Uniform
col_2 = dt_1 << New Formula Column(
Operation(Category("Random"), "Random Uniform"),
Columns(:sex, :height)
);
// Report snapshot: Big Class - Graph Builder
rep_1 = dt_1 << Graph Builder(
Size(528, 448),
Show Control Panel(0),
Variables(X(:sex), Y(col_1)),
Elements(Points(X, Y, Legend(4)))
);
And in this example dt_, col_ and rep_ are the variable name prefixes user has chosen for these specific object types.
This should make auto-generated scripts a bit more robust