My jsl script produces the following table which is the combination of summary,split and update functions.
The first few columns have actual mesureamnts for variuos test for past four months and week wise for the current month(new week gets added every sunday). The last 4 columns are expected values for each month for each test.The following are two things I'm trying-
Also my script already has 250 lines so trying to do this in a few lies of code.
1.Rename last 4 columns as Expected,MM08 and so on..The jsl I wrote doesnt work.Mostly because the last four columns(result of update function) get locked.I wrote a jsl to unlock these but that doesnt work too.
for(f=1,f<= Nitems(colNamesList),f++,
if(word(1,colNamesList[f]) == "N",
Column(colNamesList[f])<< set name(
"Expected," || word(2,colNamesList[f])
)
)
);
2.I need tp reorder columns such that Actual and expected values for a month are side by side.I re-arrange column function doesnt have a custom oredr option.
Current table -
Test Name | Actual, MM08 | Actual, MM09 | Actual, MM10 | Actual, MM11 One | Actual, MM11 Two | Actual, MM11 Three | N, MM08 | N, MM09 | N, MM10 | N, MM11 |
Test A | 0.22 | 1 | 0.9981 | 1 | 1 | 1 | 0 | 6 | 6 | 6 |
Test B | | 1 | 1 | 0 | 0.5169 | 0 | 0 | 4 | 6 | 6 |
Test C | 3.38901E-15 | 0.9853 | 0.9978 | 1 | 1 | 1 | 2 | 4 | 4 | 4 |
Test D | 1.54046E-14 | | | | | | 10 | 0 | 0 | 0 |
Test E | 7.00209E-14 | 0.4101 | 0.7707 | 0 | 0 | 0 | 8 | 8 | 6 | 6 |
Test F | 3.18277E-13 | 0.5581 | 0.7378 | 0.21955 | 0.40945 | 0.7491 | 6 | 4 | 4 | 4 |
Test AA | 1.44671E-12 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 |
Test BC | 6.57597E-12 | 1 | 1 | 0.8657 | 0.5169 | 1 | 4 | 4 | 4 | 4 |
Test CA | 2.98908E-11 | | | | | | 2 | 0 | 0 | 0 |
Expected output-
Test Name | Actual, MM08 | Expected, MM08 | Actual, MM09 | Expected, MM09 | Actual, MM10 | Expected, MM10 | Actual, MM11 One | Actual, MM11 Two | Actual, MM11 Three | Expected, MM11 |
Test A | 0.22 | 0 | 1 | 6 | 0.9981 | 6 | 1 | 1 | 1 | 6 |
Test B | | 0 | 1 | 4 | 1 | 6 | 0 | 0.5169 | 0 | 6 |
Test C | 3.38901E-15 | 2 | 0.9853 | 4 | 0.9978 | 4 | 1 | 1 | 1 | 4 |
Test D | 1.54046E-14 | 10 | | 0 | | 0 | | | | 0 |
Test E | 7.00209E-14 | 8 | 0.4101 | 8 | 0.7707 | 6 | 0 | 0 | 0 | 6 |
Test F | 3.18277E-13 | 6 | 0.5581 | 4 | 0.7378 | 4 | 0.21955 | 0.40945 | 0.7491 | 4 |
Test AA | 1.44671E-12 | 2 | 1 | 2 | 1 | 2 | 1 | 1 | 1 | 2 |
Test BC | 6.57597E-12 | 4 | 1 | 4 | 1 | 4 | 0.8657 | 0.5169 | 1 | 4 |
Test CA | 2.98908E-11 | 2 | | 0 | | 0 | | | | 0 |