cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Ahmed1
Level II

Work flow builder

Hi All, 

 

I recorded a seqeunce of data clean up steps on a file using workflow builder. I would like to be able to just change the name of the file and carry out the same set of steps however, some of my setps have name of the data table I orignially used to built the work flow builder. 

 

Is there a way I can update the names of the table to the latest table? 




e.g 
I have one of the steps as follow
Data Table("12_09") <<Select Where(!(Contains(PBI,:c000002))) << delete rows:
now when I open the data table my workflow wont excute because, the name of the table now is 13_09 

I was trying maybe to create a variable that always gets the name of the table that opened and use it through out the steps carried on workflow builder. 

Thanks in advance. 

11 REPLIES 11
hogi
Level XII

Re: Work flow builder

A kind of workaround:
close the original table. Then workflow Builder cannot find it and will ask which table to use:

hogi_0-1710351894978.png

 

The advantage - and disadvantage: 
When you save the Workflow now, Jmp will save this replacement info - and next time it will search for the new name and not for the old name anymore.

The replacement rules can be activated, checked and reset via the red triangle:

hogi_2-1710352120982.png

 

 

hogi_1-1710352042001.png

maybe: use a very strange table name when recording the workflow ... then rely on the replacement function

- and reset the replacement rule before you save the workflow [such that Jmp will search again for the table with the strange name].

 

Ryan_Gilmore
Community Manager Community Manager

Re: Work flow builder

Hi. I would suggest using the Workflow Builder option, References > Manage... This will allow you to specify when to prompt for data table or column references. 

 

Screenshot 2024-03-18 at 1.32.25 PM.png

hogi
Level XII

Re: Work flow builder

Right, much better than my workaround with the strange table name

Zoe_Betteridge
Level II

Re: Work flow builder

There is another way of doing this in the workflow script.

 

At the step where you open the data table, rather than have the script as Open ("12_09") - edit it to:

 

browse = pick file();

open(browse)

 

When you run the workflow it will prompt you to select the appropriate file when the workflow gets to that step.

 

If you are using the table at multiple steps you can have the script as:

 

browse = pick file();

open(browse) << save ("XXX") 

 

and then just change all subsequent sections of the script that ask for "12_09" to "XXX"

 

hogi
Level XII

Re: Work flow builder

Thanks.  feels much smoother than:

- Pick file: which input table file ?

- next workflow step: which data table ?

 

I tried it before with << set name() instead of << save.

But Jmp added " 2" to prevent a table name collision.

The benefit of save: it forces the file to be saved with the given  name

- nice workaround

hogi
Level XII

Re: Work flow builder

With Jmp18, there is a new approach which doesn't require any scripting *)
https://community.jmp.com/t5/Benelux-JMP-Users-Group/Workflow-Builder-or-the-quot-baby-steps-quot-in... 

 

1) use a workflow step #1 to open/create new table(s):
Subset by, open(), Multi File Import ...

 

2) Select step #1 as "Source" for a FOR EACH loop


3) and add as many workflow steps as you want to the For Each branch:

hogi_0-1712239781199.png

 

independent of the Data Table name in the individual steps, for all steps in the For Each loop, Jmp will use the the tables which were opened in step #1  

 

*) at the moment, the approach doesn't works for ".jmp" files.
TS-00135464

DJM
DJM
Level I

Re: Work flow builder

Ahmed,

 

Do you want to open something (e.g. excel file), then go to a sheet, and do some work/sorting/analysis on it?

 

use something like this:

Open(
Pick File(),
Worksheets( "Data" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 4 ),
Headers Start on Row( 21 ),
Data Starts on Row( 25 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" )
)
)

 

 

After the bold text, you can add in whatever you want.

hogi
Level XII

Re: Work flow builder

This is exactly where the problems start
- as workflow builder will record the additional steps referencing the table by its name.


I guess JMP developers are already aware of the issue and will provide a "built-in" solutions with one of the next releases ...

Re: Work flow builder

We are aware of this and have a fix in at JMP 19 with the for each loop being a bit more flexible on changing tables names.

In the meantime, you can try and use custom steps to close tables, and use the specific names of the data tables, and usually work around these issues. I also used 2 for loops one time, closing out a series of steps, and then opening a 2nd loop to do another series of steps.