I have another question - no formal training in JSL occationally comes back to bite me as I have strange issues to which there may be a very simple solution.
I have created a custom platform for my group to use - it replicates the Analysis of Means procedure (ANOM) found inside the One-Way fit y by x platform, except it allows the user to specify a target value for the analysis instead of testing against the grand mean. While this is the specific function here, I have written several others that suffer from the same issue I describe below.
In the script the user supplies information through a Column Dialog window and then I do a bunch of analysis, create graphs one at a time and append them to a window that I have created. The graphs I create are Xbar Control Charts that I customize the heck out of, nested inside of a couple of For loops to cycle through all the process variables and by variables specified by the user. The code for the graphs is stored as an expression which I substitute in all the specific information for, and I evaluate the parsed expression inside the append statement. One of these is a Where(:x = z) clause in the Control Chart platform.
What I have experienced is that when running it this way, the first graph will print fine, then, when the second graph is created, the first graph will change so that it has the data of the second graph, or the custom limits of the second graph, or something like that. Then the third graph prints and the second and first get changed. When the fourth prints,the first three may or may not change, etc... I end up with a huge mess of useless graphics.
My solution thus far has been to create a Subset of the initial table at each step of the For loops, then create the graphs from that subset rather than the original data. This works fine for making the output look pretty, but now the graphs aren't linked to the original data AND I've got lots of 'invisible' tables filling up the Home Window which I can't close in the script because they will delete the graphs created in the Report.
Is there some technique or process that I am simply unaware of which would allow me to take user specified By variables, create all the graphs I need to and have them linked to the original data AND not change when I make another? The script itself is not sensitive in anyway and if I could attach it here, I would, but I am willing to email it if someone needs it.
Thanks in advance for taking the time to read this and provide any help you can.
Ok, I've never really thought about global/local names (I have little/no formal programming training so things like that often escape my grasp). I assume I can find something on local/global variables in the scripting guide.
What I'm doing is taking a global variable and passing it to an expression via a substitute command but converting it to a Character. What's odd is that the resultant graphs are wrong, but they're all a different kind of wrong - there's no discernable pattern.
Apparently, at least part of the issue (and maybe all of it) was an error on my part. I defined some columns in the process by :Column("name") instead of :Name("name"). I don't know where I got that wrong habit from, but correcting that fixed several issues.