Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have list of SN (serial numbers) and RMA (repairs) with CLOSED DATE and REPAIR REASON. I need to program script this way that in column LAST RMA, LAST CLOSED DATE and LAST REASON, it will show me the details of last repair (RMA) for this serial number (SN), for example for SN 2 and RMA C the LAST RMA would be B with LAST CLOSED DATE 7-Feb and LAST REASON R17.
I have no idea how to do it.
RMA | SN | CLOSED_DATE | REPAIR_REASON | LAST RMA | LAST CLOSED DATE | LAST REASON |
A | 1 | 5-Feb | R13 | |||
F | 1 | 3-Mar | R10 | F | 5-Feb | R13 |
F | 1 | 3-Mar | R10 | F | 5-Feb | R13 |
F | 1 | 3-Mar | R10 | F | 5-Feb | R13 |
B | 2 | 7-Feb | R17 | |||
B | 2 | 7-Feb | R17 | |||
C | 2 | 20-Feb | R19 | B | 7-Feb | R17 |
D | 2 | 1-Mar | R16 | C | 1-Mar | R16 |
G | 2 | 3-Mar | R14 | D | 1-Mar | R16 |
G | 2 | 3-Mar | R14 | D | 1-Mar | R16 |
E | 3 | 2-Mar | R20 |
Hi,
Use the peek function. Find the syntax below:
Peek('Columnname',Rowno,'TableName')
Find the attached file for reference.
Arun
it will work just the loaded table is sorted already by SN and CLOSED date but it won't work if it's not sorted
SN | RMA | CLOSED_DATE | REPAIR_REASON |
2 | D | 1-Mar | R16 |
3 | E | 2-Mar | R20 |
1 | F | 3-Mar | R10 |
1 | F | 3-Mar | R10 |
2 | G | 3-Mar | R14 |
2 | G | 3-Mar | R14 |
1 | A | 5-Feb | R13 |
2 | B | 7-Feb | R17 |
2 | B | 7-Feb | R17 |
2 | C | 20-Feb | R19 |
in Script Sort it
Order By CLOSED_DATE desc
Try this.
We have order the tables before using the peek.
Arun