Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

peterdthornton
Not applicable

Help: Matching Run IDs

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 1Report 2
Unit 1: RP1Unit 1: RP1
Unit 1: RP1: RP2Unit 1: RP2
Unit 1: RP1: RP2: RP3Unit 1: RP3
Unit 1: RP1: RP2: RP3: RP4Unit 1: RP4
Unit 1: RP1: RP2: RP3: RP4: RP5Unit 1: RP5
Unit 1: RP1: RP2: RP3: RP4: RP5: RP6Unit 1: RP6
Unit 1: RP1: RP2: RT1: RP1: RP2Unit 1: RT1: RP2
Unit 2: RP1: RT1Unit 2: RT1: RP1

Help would be greatly appreciated!

Thanks,

Peter

3 Replies
settu_periasamy
Not applicable

Re: Help: Matching Run IDs

Hi,

Can you provide the expected output for the above table?

peterdthornton
Not applicable

Re: Help: Matching Run IDs

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:

          

TitleSample Received DateSample Start DateSample Finish DateSample IdSample Part NumberSample Lot NumberSample StageUnit Level NameUnit Level Disposition
Sample Data28 Apr 1728 Apr 1728 Apr 17I2100TH2Q07P640175257LI001PUnit1: RP1NO TEST
Sample Data28 Apr 1728 Apr 1728 Apr 17I2100TH2Q07P640175257LI001PUnit1: RP1: RP2NO TEST
Sample Data28 Apr 1728 Apr 1728 Apr 17I2100TH2Q07P640175257LI001PUnit1: RP1: RP2: RP3NO TEST
Sample Data28 Apr 1728 Apr 1728 Apr 17I2100TH2Q07P640175257LI001PUnit1: RP1: RP2: RT1: RP1NO TEST
Sample Data28 Apr 1728 Apr 1728 Apr 17I2100TH2Q07P640175257LI001PUnit1: RP1: RP2: RT1: RP1: RP2NO TEST
Sample Data28 Apr 1728 Apr 1728 Apr 17I2100TH2Q07P640175257LI001PUnit1: RP1: RP2: RT1: RP1: RP2: RP3PASS

Table 2:

        

Sample IdSample Part NumberSample Lot NumberSample StageUnit Level NameUnit Level DispositionInstrument Error CodeDescription of Error
I2100TH2Q07P640175257LI001PUnit1: RP1NO TEST3120Example
I2100TH2Q07P640175257LI001PUnit1: RP2NO TEST1246XX
I2100TH2Q07P640175257LI001PUnit1: RP3NO TEST1246XX
I2100TH2Q07P640175257LI001PUnit1: RT1: RP1NO TEST3584XX
I2100TH2Q07P640175257LI001PUnit1: RT1: RP2NO TEST6913XX
I2100TH2Q07P640175257LI001PUnit1: RT1: RP3PASS--

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

peterdthornton
Not applicable

Re: Help: Matching Run IDs

Apologies you can't see the end of the tables

Table 1:  

Unit Level NameUnit Level Disposition
Unit1: RP1NO TEST
Unit1: RP1: RP2NO TEST
Unit1: RP1: RP2: RP3NO TEST
Unit1: RP1: RP2: RP3: RT1: RP1NO TEST
Unit1: RP1: RP2: RP3: RT1: RP1: RP2NO TEST
Unit1: RP1: RP2: RP3: RT1: RP1: RP2: RP3PASS

Table 2:

    

Unit Level NameUnit Level DispositionInstrument Error CodeDescription of Error
Unit1: RP1NO TEST3120Example
Unit1: RP2NO TEST1246XX
Unit1: RP3NO TEST1246XX
Unit1: RT1: RP1NO TEST3584XX
Unit1: RT1: RP2NO TEST6913XX
Unit1: RT1: RP3PASS--