cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Michael_MXAK
Level IV

JSL to suppress "Download Data Completed" notification on HTTP Request

I am using `New HTTP Request` to paginate through a RESTful API. I expect many pages and have a fairly small page size limit, so I've written code to load the pages in chunks. My issue is that this loop requires occasional user interaction due to a pop-up reading "Download data completed.":

Michael_MXAK_0-1759853189216.png

This doesn't always happen, and I haven't been able to divine why it only sometimes occurs. Even with a consistent page size, some pages will require the user clicks OK and some won't, which is annoying because it's a long-running process to load everything. Is there a way to suppress this? We're running JMP 18.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

I'm not sure if using

Batch Interactive(1) 

would work for that. Just remember to return it back to with 

batch interactive(0);

after all the downloads have been completed

-Jarmo

View solution in original post

8 REPLIES 8
jthi
Super User

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

I'm not sure if using

Batch Interactive(1) 

would work for that. Just remember to return it back to with 

batch interactive(0);

after all the downloads have been completed

-Jarmo
Michael_MXAK
Level IV

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

Thanks for the tip! I can't find this in the scripting index, would it be used like:

Batch Interactive(1);
for(i=1, i<=n_pages, i++,
    load_page_stuff_here();
);
Batch Interactive(0);

?

Michael_MXAK
Level IV

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

I found it laid out as stated in the JSL Syntax Reference, trying it now.

jthi
Super User

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

This is simple demonstration how JMP Alert is suppressed

Names Default To Here(1);

Batch Interactive(1);
Throw("This is a test");
Batch Interactive(0); // won't execute as Throw stops the script
Show("Here!");

Compared to this

Names Default To Here(1);

Batch Interactive(0);
Throw("This is a test");

 

The message which was suppressed will be visible in the log (like Craige noted) but I'm not sure if it can be captured. At least with Throw() (might be different in other cases) Log Capture() will allow the script to continue execution for some reason

Names Default To Here(1);

Batch Interactive(1);
lc = Log Capture(
	Throw("This is a test");
);
Batch Interactive(0); // won't execute as Throw stops the script
Show("Here!");
Show(lc);
-Jarmo
hogi
Level XIII

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

So, 
a) Log Capture() "steals" the response from the log

b) JMP assumes the user handles the issue and doesn't trigger the stop.

 

?

Michael_MXAK
Level IV

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

Seems like it's working! I think! I'm deploying it to users and will see if anyone reports the issue persists. Thank you!

Craige_Hales
Super User

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

I think you can find a note in the log window with the same words from the suppressed dialog when it works.

Craige
Michael_MXAK
Level IV

Re: JSL to suppress "Download Data Completed" notification on HTTP Request

Looks like it!

Michael_MXAK_0-1759927908150.png

 

Recommended Articles