JMP 15 Modal Window error getting dataHi, I'm new to JMP scripting and recently we are going to migrate from JMP12 to JMP15.
I'm having problems with some of the scripts that used to work in JMP12, but don't work now in JMP15.
I understand from some of the posts here that it could be because the data is cleared when the modal window is closed and the information is gone.
However I'm not sure how to edit the script such that it can work in JMP15.
Any help is appreciated.
The script is as below:
Clear globals();
Clear log();
//constants
secondsInDay = 24*60*60;
secondsInWeek = secondsInDay*7;
linecount = 8;
Linename = {"1D2-CTA1","1D2-CTB1","1D2-CTA2","1D2-CTB2","1D2-CTA3","1D2-CTB3","1D2-CTA4","1D2-CTB4"};
db = New Window ("HJT Testers Data",
<< Modal,
Line up Box(
NCol(2),
Text Box("Start Date MM/DD/YYYY"),
sd = Text Edit Box (mdyhms(Today()-1*24*60*60)),
Text Box("End Date MM/DD/YYYY"),
ed = Text Edit Box (mdyhms(Today()))
),
Line up Box(
NCol(2),
Text Box ("Line"),
lineAll = Checkbox("+/- all", 0 , if(LineAll<<GET> '"||startdate||"' and "||timeFilterTableName||" < '"||enddate||"'";</GET>After this, the script will then perform a SQL query to get information using the aforementioned standardDataString, timeRangeString, and lineString.
Thanks in advance!
Re: JMP 15 Modal Window error getting dataThanks! This works now!
Re: JMP 15 Modal Window error getting dataThe problem occurs if you do not check any of the checkboxes, and leave the default one checked. The section of code that initializes myline is never run. This code fixes the problem:
Clear Globals();
Clear Log();
//constants
secondsInDay = 24 * 60 * 60;
secondsInWeek = secondsInDay * 7;
linecount = 8;
Linename = {"1D2-CTA1", "1D2-CTB1", "1D2-CTA2", "1D2-CTB2", "1D2-CTA3", "1D2-CTB3", "1D2-CTA4",
"1D2-CTB4"};
db = New Window( "HJT Testers Data",
<<MODAL> '" || startdate || "' and " || timeFilterTableName
|| " < '" || enddate || "'";</MODAL>Re: JMP 15 Modal Window error getting dataHi, I tried to copy your solution and run it, but it says "Name Unresolved: myLine in access or evaluation of 'myLine', myLine.
Is it because the myLine is referenced somewhere but again it's no longer accessible?
Thanks for your help.
Re: JMP 15 Modal Window error getting dataThe issue is the referencing of the Checkbox() display object called "line". You are attempting to access the object after the modal window has been closed in JMP 15. Apparently, in JMP 12, the object remained accessable longer. Below is the simple fix to the issue. It works in both JMP 12 and 15:
Clear Globals();
Clear Log();
//constants
secondsInDay = 24 * 60 * 60;
secondsInWeek = secondsInDay * 7;
linecount = 8;
Linename = {"1D2-CTA1", "1D2-CTB1", "1D2-CTA2", "1D2-CTB2", "1D2-CTA3", "1D2-CTB3", "1D2-CTA4", "1D2-CTB4"};
db = New Window( "HJT Testers Data",
<<MODAL> '" || startdate || "' and " || timeFilterTableName || " < '" || enddate || "'";</MODAL>