User 247c00dc1d
20-06-2013 17:09:59
Dear Sir,
I have the task to create the New detail table by treating of the the Structure table.
The initial table which I have (imported into IJC from sdf-file), among other, contains next fields:
ID | A1 | B1 | C1 | A2 | B2 | C2 | D |
STR001 | 132 | 17 | 56 | 38 | 2 | F77 | |
STR002 | 25 | 73 | 50 | 56 | 61 | N93 | |
STR003 | 45 | 41 | 56 | 51 | F64 |
I need a some script which will do next:
Script should ask: generate the new table using Data from group 1 (A1;B1,C1) or group 2 (A2;B2,C2)?
if group 1 was choosed built the next table:
1) If for the curent ID in the field Ai, Bi, Ci of selected group i the data exists, then new string is forming, and filled like in table bellow, else (like in the case of C1 for STR001) new string not forming.
2) adding the marker to the ID (shows the field from what data was taken) - as example, in 1st row to the ID added: -(A), and new IDpx is: STR001-(A). Field E contain the data from correspond cross-cell. So, for single ID several strings can be formed with different markers at ID and value in field E but field D will be same
So in the our case should apear next table:
IDpx | E | D |
STR001-(A) | 132 | F77 |
STR001-(B) | 17 | F77 |
STR002-(A) | 25 | N93 |
STR002-(B) | 73 | N93 |
STR002-(C) | 50 | N93 |
STR002-(C) | 45 | F64 |
And one more script for the exporting of some field (for example IDpx and E) of obtained table into the Excel (r)
Help me please with this difficult tasks...
Thanks!!!
p.s. sorry for my English :)
Igor