cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
chris_dennis
Level III

JSL Error collecting data through interactive Modal Window.

I am trying to use a modal window in a script.  The window is intended to display a window with some text information, a graph, and ask the user to enter some information by Yes/No questions.  User results will be stored in a data table and information will be stored for latter reference in a Journal.  I receive the following error when the "Cancel" button is pressed: at line 443 in development 3.jsl  There is no response to the modal window when the "Submit" Button is pressed,  I expect the window to close.  

I would appreciate any help or suggestions you might be able to provide.  My development script is attached for reference.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: JSL Error collecting data through interactive Modal Window.

You are getting errors because you are trying to access the modal window after it has been closed. << Close Window is also unnecessary with modal windows as cancel will close the window without any modifications. My suggestion would be to utilize << Return Result with modal window and then use the rpt_win["Button"] to check if user pressed cancel or not. There are other issue in the script, but I would start by fixing that.

-Jarmo

View solution in original post

5 REPLIES 5
jthi
Super User

Re: JSL Error collecting data through interactive Modal Window.

I think you might have attached incorrect file or at least the project is missing the script file.

-Jarmo
chris_dennis
Level III

Re: JSL Error collecting data through interactive Modal Window.

jthi,  Thanks for catching.  I grabbed the incorrect file in the drag and drop.  I have attached the correct file below.

jthi
Super User

Re: JSL Error collecting data through interactive Modal Window.

You are getting errors because you are trying to access the modal window after it has been closed. << Close Window is also unnecessary with modal windows as cancel will close the window without any modifications. My suggestion would be to utilize << Return Result with modal window and then use the rpt_win["Button"] to check if user pressed cancel or not. There are other issue in the script, but I would start by fixing that.

-Jarmo
chris_dennis
Level III

Re: JSL Error collecting data through interactive Modal Window.

jthi,  Thanks for pointing me in the right direction. I review the example in the scripting index searching on "Return Result" and it was very helpful.  I have attached modified script base on this (Changes are lines 398 to 537, rest is just stuff I grabbed to make a working example of the display window.  I am sure the JSL is not the best mostly just trying to get something that works and will save time doing the exercise.  

chris_dennis
Level III

Re: JSL Error collecting data through interactive Modal Window.

Incorrect attachment placed in original post.  Please see correct JSL file attached.

Recommended Articles