cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
kom
kom
Level IV

Dashboard not updating as expected.

Hi all. I'm running 3 simple & identical scripts to create SPC charts for Operators. The idea is that they'll enter basic test results, click one button and then observe for shifts/trends/outliers.

 

Rather than displaying all of the data on the charts, the scripts are setup to show just the last 30 datapoints on the SPC charts. When I add (say) 10 more rows of data, the scripts move on as planned, and life is good. I've created a simple dashboard (my first) to display all 3 SPC charts side by side. Each time I run the script for the 1st time, it looks exactly like I want it to look, i.e. each of the 3 charts display the last 30 datapoints.

 

However, when I add (say) 10 rows of data to my data table & run the script again, the 3 charts in the dashboard don't move on automatically as they do when I run the scripts individually (outside of the dashboard). The data has been added to the charts in the dashboard, but I can only see the data by manually sliding the X-axis. Am I missing something obvious here?

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Dashboard not updating as expected.

Your script dynamically sets the Min/Max of the x axis based on nrows():

 

	Dispatch(
		{},
		"label",
		ScaleBox,
		{Min( nrows()-30 ), Max( nrows()+3 ), Inc( 1 ), Minor Ticks( 0 )}
	),

When a report is added to Dashboard Builder (or Combine Windows), the script that it captures is the same as you would see with <<Save Script to Script Window, which has hardcoded parameters:

 

	Dispatch(
		{},
		"label",
		ScaleBox,
		{Min( 24 ), Max( 57 ), Inc( 1 ), Minor Ticks( 0 )}
	),

It is possible to edit Platform scripts in Dashboard Builder, but that will not help in this case because every time the script is saved it will recapture the script again.  This is necessary in order to incorporate changes like open/close of outlines, or other changes that have been made while in preview mode.

 

In this case, the easiest solution might be to edit the dashboard script directly.  If you are saving a .jmpapp / .jmpappsource file, you can just edit this file with any text editor.  If you are saving to a table script, it maybe best to use Save Script to Script Window for the Dashboard, edit the script, and then copy/paste into a table script.  Note that if you use Save Script to Script Window, the syntax of the script will be JMPApp(...) << Edit.  Change this to JMPApp(...) << Run to create a dashboard that will run the analysis rather than opening the Dashboard Builder.

View solution in original post

stan_koprowski
Community Manager Community Manager

Re: Dashboard not updating as expected.

Hi @kom ,

As @danschikore mentioned, for your particular case, you simply need to edit and replace 3 single lines of code.

The code has already been written previously.

From within the dashboard click the top most red triangle and select Save Script >>To Script Window

 

Save Script to To Script WindowSave Script to To Script Window

And then Replace this line of code in each of the reports ( if you have the line numbers enabled for the script editor the lines are 87, 187 and 276)

{Min( 24 ), Max( 57 ), Inc( 1 ), Minor Ticks( 0 )}

with this line of code

{Min( nrows()-30 ), Max( nrows()+3 ), Inc( 1 ), Minor Ticks( 0 )}

And then replace line 536 the very last line

) << Edit

with

) << Run

Copy the entire contents of the script window using Edit Select All. Edit Copy or Using keyboard shortcuts on PC ctrl+A and then ctrl C ( on the Mac Command+A and Command+C)

Finally, then back in the data table you can click on the red triangle and select New Script.

Select New ScriptSelect New Script

And paste the contents of the clipboard using Edit Paste or ctrl+v (Mac Command+v) into the Script section.

Provide a name for the script and click "OK"

 

New Table ScriptNew Table Script

 

I have attached the data table with the new table script and added a new row of output to the data table.

Does this get you closer to what you want?

cheers,

Stan

 

PS: For the curious I am using the new JSL dark theme coming out in JMP 15 ( to be released fall 2019).

 

JSL Dark ThemeJSL Dark Theme

 

View solution in original post

4 REPLIES 4

Re: Dashboard not updating as expected.

Your script dynamically sets the Min/Max of the x axis based on nrows():

 

	Dispatch(
		{},
		"label",
		ScaleBox,
		{Min( nrows()-30 ), Max( nrows()+3 ), Inc( 1 ), Minor Ticks( 0 )}
	),

When a report is added to Dashboard Builder (or Combine Windows), the script that it captures is the same as you would see with <<Save Script to Script Window, which has hardcoded parameters:

 

	Dispatch(
		{},
		"label",
		ScaleBox,
		{Min( 24 ), Max( 57 ), Inc( 1 ), Minor Ticks( 0 )}
	),

It is possible to edit Platform scripts in Dashboard Builder, but that will not help in this case because every time the script is saved it will recapture the script again.  This is necessary in order to incorporate changes like open/close of outlines, or other changes that have been made while in preview mode.

 

In this case, the easiest solution might be to edit the dashboard script directly.  If you are saving a .jmpapp / .jmpappsource file, you can just edit this file with any text editor.  If you are saving to a table script, it maybe best to use Save Script to Script Window for the Dashboard, edit the script, and then copy/paste into a table script.  Note that if you use Save Script to Script Window, the syntax of the script will be JMPApp(...) << Edit.  Change this to JMPApp(...) << Run to create a dashboard that will run the analysis rather than opening the Dashboard Builder.

kom
kom
Level IV

Re: Dashboard not updating as expected.

Hi Dan,

Many thanks for taking the time to reply to my query. It's unfortunate that the Dasboard won't work the way I had assumed it would. I'm not gonna lie, it'll probably take me a while to figure out your last suggestion of editing the Dashboard script directly. I had found the Dashboard script entry screen and had added a 'Maximise Window' command, but since there wasn't really any other code in there, I assumed that the Dashboard function would just display the output that the original scripts created.

 

Your last paragraph reads a little like egyptian hieroglyphics to me, so I will take my time and try to fumble my way through your suggestion.

I'm guessing that by the unusually quiet responses to my query, no-one else has any other ideas!

 

Thanks again.

Kieran

 

stan_koprowski
Community Manager Community Manager

Re: Dashboard not updating as expected.

Hi @kom ,

As @danschikore mentioned, for your particular case, you simply need to edit and replace 3 single lines of code.

The code has already been written previously.

From within the dashboard click the top most red triangle and select Save Script >>To Script Window

 

Save Script to To Script WindowSave Script to To Script Window

And then Replace this line of code in each of the reports ( if you have the line numbers enabled for the script editor the lines are 87, 187 and 276)

{Min( 24 ), Max( 57 ), Inc( 1 ), Minor Ticks( 0 )}

with this line of code

{Min( nrows()-30 ), Max( nrows()+3 ), Inc( 1 ), Minor Ticks( 0 )}

And then replace line 536 the very last line

) << Edit

with

) << Run

Copy the entire contents of the script window using Edit Select All. Edit Copy or Using keyboard shortcuts on PC ctrl+A and then ctrl C ( on the Mac Command+A and Command+C)

Finally, then back in the data table you can click on the red triangle and select New Script.

Select New ScriptSelect New Script

And paste the contents of the clipboard using Edit Paste or ctrl+v (Mac Command+v) into the Script section.

Provide a name for the script and click "OK"

 

New Table ScriptNew Table Script

 

I have attached the data table with the new table script and added a new row of output to the data table.

Does this get you closer to what you want?

cheers,

Stan

 

PS: For the curious I am using the new JSL dark theme coming out in JMP 15 ( to be released fall 2019).

 

JSL Dark ThemeJSL Dark Theme

 

kom
kom
Level IV

Re: Dashboard not updating as expected.

@danschikore 

Many thanks again Dan for providing me with the solution. Works perfectly for me. Much appreciated.

 

@stan_koprowski 

Stan, thanks so much for explaining to me at the level that I so needed. Extremely patient & helpful. Thank you!