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.
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.