Hi folks,
I'm trying to write a script that will create some variants of a date-time-column in the table. For example:
1. User selects the date-time-column in a dialog: E.g.: :DateTime
2. => the script creates a new column using a formula: Hour(:DateTime)
My problem is to figure out how to create a formula that is referencing a column specified by the user. Current ly I am doing this:
time = .;
New Window( "Generate Time Indicators",
<<Modal,
V List Box(
Text Box( "Time Variable" ),
ts = Col List Box( Current Data Table(), all, time = (ts << Get Selected)[1] ),
Text Box( "(Chose indicators to create)" ),
cb = Check Box(
{"Day of Week (numeric)", "Day of Week (character)", "Month (numeric)", "Month (character)", "Year"}
)
)
);
inds = cb << Get Selected();
If( Contains( inds, "Month (numeric)" ),
fml = Eval Expr( Month( As Column( Expr( time ) ) ) );
Current Data Table() << New Column( "Month", Formula( Name Expr( fml ) ) );
);<BR />
This script works for me, but does not for work for any of my co-workers. We are all running JMP 13.1.0. One person is running JMP on a Mac, while all others are using Windows 10 (me including).
Here is what my boss gets:


For me everything works fine:

Thanks a lot to any1 who can tell me whats going on here!