Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
All,
I am having trouble matching the run numbers of two files. Report 1 is generated with a continuous log of the repeats (RP) and retests (RT). As you can see, in Report 2 only the highest RP is recorded and this is reset when there is a RT.
There is an endless possibly ways the RPs and RTs can occur.
Report 1 | Report 2 |
Unit 1: RP1 | Unit 1: RP1 |
Unit 1: RP1: RP2 | Unit 1: RP2 |
Unit 1: RP1: RP2: RP3 | Unit 1: RP3 |
Unit 1: RP1: RP2: RP3: RP4 | Unit 1: RP4 |
Unit 1: RP1: RP2: RP3: RP4: RP5 | Unit 1: RP5 |
Unit 1: RP1: RP2: RP3: RP4: RP5: RP6 | Unit 1: RP6 |
Unit 1: RP1: RP2: RT1: RP1: RP2 | Unit 1: RT1: RP2 |
Unit 2: RP1: RT1 | Unit 2: RT1: RP1 |
Help would be greatly appreciated!
Thanks,
Peter
Hi,
Can you provide the expected output for the above table?
Hi,
I want to link the two tables. One is a report log and the other is a detail of why the run was a repeat.
Here is some better sample data;
Table 1:
Title | Sample Received Date | Sample Start Date | Sample Finish Date | Sample Id | Sample Part Number | Sample Lot Number | Sample Stage | Unit Level Name | Unit Level Disposition |
---|---|---|---|---|---|---|---|---|---|
Sample Data | 28 Apr 17 | 28 Apr 17 | 28 Apr 17 | I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP1 | NO TEST |
Sample Data | 28 Apr 17 | 28 Apr 17 | 28 Apr 17 | I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP1: RP2 | NO TEST |
Sample Data | 28 Apr 17 | 28 Apr 17 | 28 Apr 17 | I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP1: RP2: RP3 | NO TEST |
Sample Data | 28 Apr 17 | 28 Apr 17 | 28 Apr 17 | I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP1: RP2: RT1: RP1 | NO TEST |
Sample Data | 28 Apr 17 | 28 Apr 17 | 28 Apr 17 | I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP1: RP2: RT1: RP1: RP2 | NO TEST |
Sample Data | 28 Apr 17 | 28 Apr 17 | 28 Apr 17 | I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP1: RP2: RT1: RP1: RP2: RP3 | PASS |
Table 2:
Sample Id | Sample Part Number | Sample Lot Number | Sample Stage | Unit Level Name | Unit Level Disposition | Instrument Error Code | Description of Error |
---|---|---|---|---|---|---|---|
I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP1 | NO TEST | 3120 | Example |
I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP2 | NO TEST | 1246 | XX |
I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RP3 | NO TEST | 1246 | XX |
I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RT1: RP1 | NO TEST | 3584 | XX |
I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RT1: RP2 | NO TEST | 6913 | XX |
I2100TH2Q | 07P6401 | 75257LI00 | 1P | Unit1: RT1: RP3 | PASS | - | - |
There are an endless possible ways the repeats / retests can occur. I was hoping to write code that would do the following:
- Read from left to right
- Record highest RPN where N is 1-30
- If RT occurs then record RT N and restart the read of RP from that position.
The outcome id to link the two reports and this is the only way to identify between each run.
Thanks for the help!
Peter
Apologies you can't see the end of the tables
Table 1:
Unit Level Name | Unit Level Disposition |
---|---|
Unit1: RP1 | NO TEST |
Unit1: RP1: RP2 | NO TEST |
Unit1: RP1: RP2: RP3 | NO TEST |
Unit1: RP1: RP2: RP3: RT1: RP1 | NO TEST |
Unit1: RP1: RP2: RP3: RT1: RP1: RP2 | NO TEST |
Unit1: RP1: RP2: RP3: RT1: RP1: RP2: RP3 | PASS |
Table 2:
Unit Level Name | Unit Level Disposition | Instrument Error Code | Description of Error |
---|---|---|---|
Unit1: RP1 | NO TEST | 3120 | Example |
Unit1: RP2 | NO TEST | 1246 | XX |
Unit1: RP3 | NO TEST | 1246 | XX |
Unit1: RT1: RP1 | NO TEST | 3584 | XX |
Unit1: RT1: RP2 | NO TEST | 6913 | XX |
Unit1: RT1: RP3 | PASS | - | - |