BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
Highlighted
mibelle
New Contributor

Create Dashboard within journal

I've built a journal that steps through opening a datafile and building a series of graphs. I'd like to have a script button at the end of the journal that creates a dashboard from these graphs. Is there a way to script this? 

 

I tried running through the journal, manually building a dashboard from the resulting reports, and saving that script to the journal. However, this resulted in the dashboard only using that specific datafile. So when I run the journal for Datafile 2 the dashboard button still builds off Datafile 1.

 

I adjusted the dashboard script button to use "opendatatable" but that resulted in an empty dashboard being created. 

 

Any suggestions on how to do this?

 

Thanks!

0 Kudos
2 REPLIES 2

Re: Create Dashboard within journal

Can you describe in more detail what you are doing at each step in the Journal?  I'm envisioning something like this:

 

New Window("test", << Journal,
	Button Box("Open Data",
		dt = Open();
	),
	Button Box("Build Report",
		col = Column(dt,1);
		if (col << Get Modeling Type() == "Continuous",
			dist = dt << Distribution(Continuous Distribution(Column(col)))
		,
			dist = dt << Distribution(Nominal Distribution(Column(col)))
		);
	),
	Button Box("Build Dashboard",
		dash = JMP App();
		dash << Combine Windows({dist << Report});
		dash << Run;
	)
)

But it sounds like you have added the full script for the Dashboard in the final section.  Dashboards typically use Current Data Table() for the table input - which would be good, provided that you can guarantee that the Current Data Table does not change before you invoke the final button.  Bringing a table window to the foreground may change the Current Data Table, as would other actions.  You could call Current Data Table() from the "Build Dashboard" button script to ensure that the correct table is active.  I was unsure what you meant about using opendatatable from the Dashboard script.

 

The Dashboard script also contains the full script for each platform - does your "Build Report" step always produce the same reports?  If so then using a set dashboard script should be fine.  The advantage of calling <<Combine Window, as I do in the example above, is that it will get a new copy of each report script every time, but one thing you would have to make sure of in this case is that the window layout is as you would like - Combine Windows will use the layout of the given reports on the screen to decide how to create the Dashboard.

mibelle
New Contributor

Re: Create Dashboard within journal

Yes, I'm always producing the same reports. I adjusted my script to mimic yours and added in the "currentdatatable" step and it worked perfectly. Thank you!

0 Kudos