Hi JMP community,
I was wondering if it would be possible to script the generation of a journal containing selected tables and/or figures including a Text Edit Box for each table/figure.
I came across an Add-in that is doing part of what I would like to do: https://community.jmp.com/t5/JMP-Add-Ins/Run-All-Table-Scripts/ta-p/42863
I’m only interested in the Tiled Report option but would like the addition of a Text Edit box for all selected scripts because I would like to add comments to them. I was able to add a Text Edit Box at the start and at the end of the Journal but I can’t seem to figure out (if and) how to add them for every script. The amount of selected scripts will change based on the amount of figures needed for the journal.
For my needs, I took parts of the Run All Table Scripts Add-in I could use and tried to change it. So far without success. Does anyone have suggestions how to add Text Edit Boxes to all scripts in a journal?
//This script is part of the Run All Table Scripts Add-in written by nickholmes13: https://community.jmp.com/t5/JMP-Add-Ins/Run-All-Table-Scripts/ta-p/42863.
Names Default To Here( 1 );
dt = Current Data Table();
appName = "Run All Table Scripts";
If (IsEmpty(dt),
Try(dt=Open(), Show("No data table is open so the Data Table Script Runner tool could not execute."));
);
If(IsEmpty(dt),
Stop();
);
Wait(.5);
dtTitle = dt << Get Window Title();//Get title of data table
allScripts = dt <<GET table="" script="" names="">"||dtTitle||". Be aware that all table scripts will be run, even if they do not create reports. Also note that applications created in table scripts will always appear in a separate window. \!n",
<< Markup),
Panel Box ("Which table scripts would you like to run?",
V List Box(
scriptsTR = Check Box(allScripts, << Set All(1)),
),
H List Box(
Button Box("Check All", scriptsTR << Set All(1)),
Button Box ("Check None", scriptsTR << Set All(0))
),
Spacer Box(Size(0,10)),
Text Box("Report View"),
rType = Radio Box({"Detailed", "Summary"})
),
H List Box(
Button Box ("Cancel", popup << Close Window()),
Spacer Box(),
Button Box ("Run", reportView = rType << Get();
scriptsTR = scriptsTR << Get Selected();
onRun(reportView, scriptsTR);
popup << Close Window())
)
)
)
);
popup<<SET auto="" stretching=""></SET></GET>I hope it is allowed to use and change the add-in provided in the link above (it was not locked). If not, I will delete this post. Credits for the Run All Table Scripts for: nickholmes13.
Thank you.
Thank you jthi, this is what I was looking for!
One option would be to edit the else statement inside the for loop in onRun function. See how the else statement has been built/modified:
If(i == 1,
window = New Window(dtTitle || " Reports",
<<JOURNAL></JOURNAL>