Workflow Builder is great - the user doesn't need to know any JSL scripting.
... till he is confronted with the trap: table name conflicts.
In 50% of the cases, there is no table with matching name - and JMP will ask.
The issue starts, IF there is a table with matching name, and it's the wrong one.
The topic is dicussed in the Q&A of this talk:
Workflow Builder or the "baby steps" into Scripting
There are several "workarounds":
The easiest one (#4b) - following @jthi example:
use a bit of JSL and store the table references as "dt". Then use dt also in all the other workflow steps.
NB: Specifying "Output Table" just works till there is a collision, then "Untitled" will be "Untitled 2".
other approaches:
#1 use the rewind icon
... to close all data tables, then the newly generated table will again be "Untitled".
-> no robust solution
The approach will fail once there is an open data table Untitled and the user tries to run the workflow.
#2: save
after creating the data table, save it with a specific name. Use the saved data table to record the additional steps.
Cool: With Save, even if there is a table name conflict - JMP won't add a "2".
Just use every time the same temporary file and overwrite it.
Not nice - but very effective!!
@Zoe_Betteridgein Using-JMP-Workflow-Builder-to-Automate-Analysis
#3: new since JMP18: use the for each loop
It replaces all table names in nested workflow steps with the table name from the import step (also works for N=1):
https://community.jmp.com/t5/Benelux-JMP-Users-Group/Workflow-Builder-or-the-quot-baby-steps-quot-in...
#4: with a bit of JSL: in all workflow steps, remove the table name references
// for workflow steps like
// Data Table("mytable") << command (...);
// just remove the data table and get:
command( ... )
[unfortunately, there are several exceptions where this approach will fail].
#4b: change the code and use a variable as reference for the data table
import step:
// add "dt ="
dt = open( ...);
subsequent worklow steps:
// replace:
// Data Table("mytable") << command (...)
// with
dt << command( ...)
I hope, in a future version of JMP there will be a Workflow Builder which automatically prevents the user from getting into this trap, e.g.
- once a data table is created, Worklow Builder could ask for a suitable variable name to reference the data table.
- a button in Workflow Builder:
replace Data Table reference by table name -> Data Table reference by variable