Need help with JSL code for table save and closeHi ,
I I'm new to JSL and i need help with the following :
//Open a csv table with a Button Box.
Lot_Tracker_window=New Window("Lot tracker", Lot_Tracker = Button Box("Lot tracker", dt=open("C:\Users\user\Documents\Temp\Lot tracker.csv")) );
//After i make changes in dt table by aditing the JMP table window. I want to Save&Close my changes to the original file "Lot tracker.csv", by using a new Button Box that i want to popup when i click Lot_Tracker Button Box. what am i doing wrong?
New Window("Save To Lot Tracker", Save_Lot_Tracker = Button Box("Save To Lot Tracker", dt << save("C:\Users\user\Documents\Temp\Lot tracker.csv")));
Quit()
Re: Need help with JSL code for table save and closeThx you have been a great help.Re: Need help with JSL code for table save and closeNot in this case, however, you can actually just embed the second piece of code inside the button box in the first window, and you will get what you want.
Lot_Tracker_window = New Window( "Lot tracker",
Lot_Tracker = Button Box( "Lot tracker",
dt = Open( "C:\Users\user\Documents\Temp\Lot tracker.csv" );
Lot_Tracker_window << close window;
New Window( "Save To Lot Tracker",
Save_Lot_Tracker = Button Box( "Save To Lot Tracker",
dt << save( "C:\Users\user\Documents\Temp\Lot tracker.csv" );
Quit();
)
);
)
);Re: Need help with JSL code for table save and closeThx for the help.
Is it posible to use the modal without the OK button?
Re: Need help with JSL code for table save and closethxRe: Need help with JSL code for table save and closeI believe your issue is that the way you have your code setup, you are assuming that JMP will wait for you to complete each step before moving on. However, the default in JSL is to continue processing further statements, until the code is complete(without pausing). Therefore, your code will pop up the two windows, and then see the Quit() and stop processing. What you need to do, it to do, is to make the first window a Modal window, and then to embed the Quit() function into the second window, so that it will be executed only after the Save button is pushed.
//Open a csv table with a Button Box.
Lot_Tracker_window = New Window( "Lot tracker",
modal,
Lot_Tracker = Button Box( "Lot tracker",
dt = Open( "C:\Users\user\Documents\Temp\Lot tracker.csv" )
)
);
//After i make changes in dt table by aditing the JMP table window.
//I want to Save&Close my changes to the original file "Lot tracker.csv",
//by using a new Button Box that i want to popup when i click
//Lot_Tracker Button Box. what am i doing wrong?
New Window( "Save To Lot Tracker",
Save_Lot_Tracker = Button Box( "Save To Lot Tracker",
dt << save( "C:\Users\user\Documents\Temp\Lot tracker.csv" );
Quit();
)
);