I have a table that looks like the table below:
| operator |
M type |
description |
description 2 |
M1 |
M2 |
M3 |
M4 |
M5 |
M6 |
| 415 |
Nxyz |
A hot |
Hot clean 1 |
415 |
415 |
415 |
415 |
415 |
415 |
| 615 |
Nxyz |
B cold |
Cold clean 1 |
615 |
615 |
615 |
|
615 |
615 |
| 815 |
Nxyz |
A hot |
Hot clean 2 |
815 |
815 |
815 |
815 |
815 |
815 |
| 1015 |
Nxyz |
B cold |
Cold clean 2 |
1015 |
|
1015 |
1015 |
1015 |
1015 |
| 1215 |
Nxyz |
A hot |
Hot clean 1 |
1215 |
1215 |
1215 |
1215 |
1215 |
1215 |
| 1415 |
Nxyz |
B cold |
Cold clean 1 |
1415 |
1415 |
1415 |
1415 |
1415 |
|
| 1615 |
Nxyz |
A hot |
Hot clean 2 |
1615 |
1615 |
1615 |
1615 |
1615 |
1615 |
| 1815 |
Nxyz |
B cold |
Cold clean 2 |
1815 |
1815 |
1815 |
|
|
1815 |
I want to select only the rows that is empty. Since the columns M1-M6 can vary each time I pull the data I can't use the column names in the JSL script. I'm trying to use a FOR loop below to select the rows of empty data, but this only selects the rows where the last cell is empty.
dt = Current Data Table();
nc = dt << get column names( Numeric );
For( i = 1, i <= N Items( nc ), i++,
dt <<select where( Is Missing( nc[] )));
Eventually I want to get the output table to look like the following
| operator |
M type |
description |
description 2 |
Machine |
| 615 |
Nxyz |
B cold |
Cold clean 1 |
M4 |
| 1015 |
Nxyz |
B cold |
Cold clean 2 |
M2 |
| 1415 |
Nxyz |
B cold |
Cold clean 1 |
M6 |
| 1815 |
Nxyz |
B cold |
Cold clean 2 |
M4 |
| 1815 |
Nxyz |
B cold |
Cold clean 2 |
M5 |
The big trick to this is to do this without coding in the column names for (M1,M2 etc...) as they are going to change.
Any Ideas