Script for generating new column with comma separated and stackI would like to write a script/addin for the following.
Right now, I am doing this manually by using JMP menu options. I would like to achieve the same using script/addin:
| By selecting Column= Wafers. I go to Cols--> Utilities--> TEXT to COLUMNS. Then I select Delimeter=, |
| It gives me additional columns Wafers1, wafers2 which I then stack. Stack Data colum name= Wafer |
| I then delete any empty row with Data= empty. |
| "Next, I add a new column named WaferId. This column concatenates the Lotid string with the Wafer column in the following format: WaferId = "5384" || "-" || Right(Char(:Wafer), 2, "0"). I would like the Lotid to be entered manually by the user in a popup box." In this case. Lot id= "5384" |
| Group | xx Dep | 81 x | Wafers |
| 01C | TR | TR | 5, 8 |
| 02E | TR | TR | 12, 18 |
| 03E | SKIP | 1000C PG | 17, 23 |
| 04E | ENG_CSIO_HCD_35A_1CY_6+9 | 1000C PG | 14, 24 |
| 05E | SKIP | 1000C PG | 15, 19 |
| 06E | ENG_CSIO_HCD_35A_1CY_6+9 | 1000C PG | 13, 16 |
| 07E | SKIP | 1000C PG | 6, 10 |
| 08E | ENG_CSIO_HCD_35A_1CY_6+9 | 1000C PG | 4 |
| 09E | SKIP | 1000C PG+850C 5 mins | 11, 22 |
| 10E | ENG_CSIO_HCD_35A_1CY_6+9 | 1000C PG+850C 5 mins | 1, 2 |
| 11E | CIL ENG_CSIO_HCD_15A | 1000C ISSG | 9, 25 |
| 12E | CIL ENG_CSIO_HCD_25A | 1000C ISSG | 3, 7 |
| 13E | CIL ENG_CSIO_HCD_45A | 1000C ISSG | 20, 21 |



Final Output is

Automation and ScriptingRe: Script for generating new column with comma separated and stackPlease have a look at the log:

All these steps get recorded by JMP - you don't have to create any code on your own, just follow @Jordan_Hiller 's suggestion to steal the code from the log ( and make some tiny adjustments. Many tricks can be found in his Discovery Summit presentation)
The part with the "manually entered Lot ID", you can steal from the Scripting Index:
New window - Modal Dialog

Re: Script for generating new column with comma separated and stackI was able to get these through LOG. But how do I do the last part? I.e. get input from user and ask for the input from user through text box popup?
dt= current data table();
dt<< Text to Columns( columns( :Wafers ), Delimiters( "," ) );
dt2=dt1 << Stack(
columns( :Wafers 1, :Wafers 2 ),
Source Label Column( "Label" ),
Stacked Data Column( "WaferId" )
);
dt2 << Select Where( :WaferId == "" ) << Delete Rows;
Re: Script for generating new column with comma separated and stack@hogi gave you the solution to your current question.
Go to the Scripting Index
Help=>Scripting Index
Filter on New Window and in the Examples, use the down arrow and select Modal Dialog