JSL Scripting: How to skip object send to journal if object does not exist
Oct 9, 2014 2:26 PM(1527 views)
I have an issue where we are running a script off an actively changing data set. Sometimes graphs will not be generated depending on conditions in the data set. At the end of the script, I send all graphs to the journal, then save the journal. However, if a graph does not exist (Because for that week there was no data for it), the script will error because it can't find the object.
Is there a way to say " object <<journal" but if object does not exist, skip this line and continue with the rest of the script?
CAR1 << Journal;
CAR2 << Journal;
CAR3 << Journal;
so CAR1 and CAR3 were both generated in the script as they had data. CAR2 was not because there was no data this week for CAR2. Currently, JMP will error out when it try's to send CAR2 to the journal (bc CAR2 does not exist). How can I get it to skip CAR2 and still continue with the rest of the script.