I have a JMP script that launches a SQL query and then processes the datatable that results. Then it does a series of column manipulations and other table operations. When I execute the script in the JSL builder it still lists a datatable in the box next to the "play" button. Even though I have "NamesDefaultToHere(1)", it will often still alter columns in the table listed in the box of the JSL window (if they have the same column names) - instead of the table generated by the SQL query. Is there a line to the script I can add to prevent this behavior? For example, with the below script - if the existing table has a column "DIEID" it will get changed and not the SQL datatable created by the script. If there are no tables open, it works correctly.
Thanks and let me know if you need additional information.
NamesDefaultToHere(1);
query = open("C:\Users\tbaker1\Documents\JMP Scripts\IgniteRuns_V2.jmpquery",Private);
dtIGNITE = query << Run Foreground();
dtIGNITE << show window(1);
dtIGNITE << New Column("DIEID");
Column("DIEID") << Formula(If(
!Is Missing( :Name( "Old-DieID" ) ), :Name( "Old-DieID" ),
!Is Missing( :Name( "EEPROM-FCSerialNumber" ) ), :Name( "EEPROM-FCSerialNumber" ),
"Missing"));