Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Mkrishna
Contributor
Contributor

cyclic sequence number generation

i have to load a file with header detail and footer record in to a single file but when we load the records separate sequence number should be created for header and detail record, how can we achieve this.

 

example source

BIA00000000051070UPAULINA
SVA00000000051070S000009003RESFee
SVA00000000051070S000009003RESSupply
MTA00000000051070S000009003M000004576EL
BIA00000000091687UJACKSON
SVA00000000091687S000001365RESFee
SVA00000000091687S000001365RESSupply
MTA00000000091687S000001365M000001772E

Here BI is header and sva is detail ,mat is footer records

Req: i need to generate two sequence no as  below as

 seaqno

    1        BIA00000000051070UPAULINA
    1 1     SVA00000000051070S000009003RESFee
    1 2     SVA00000000051070S000009003RESSupply
    1 3     MTA00000000051070S000009003M000004576EL
    2        BIA00000000091687UJACKSON
    2 1     SVA00000000091687S000001365RESFee
    2 2     SVA00000000091687S000001365RESSupply
    2 3     MTA00000000091687S000001365M000001772E

Labels (2)
15 Replies
Mkrishna
Contributor
Contributor
Author

Hi rhall , thank you for your answers 

 

here i did the same things in the following way but i am getting error , can you suggest my where i did a mistake

 

Var.Prev_row.compareToIgnoreCase(row1.Account_no)==0? Var.Count1:Var.Count+1 ..... ....integer 

row1.Account_no = Var.Prev_row ......string

0=Var.Count ......integer

Var.Count= Var.Count1 ..... integer

 

Anonymous
Not applicable

What error did you get?
Can you post a screenshot of your configuration as well?

Mkrishna
Contributor
Contributor
Author

Hi rhall,

 

Thank you for your answers , now i got proper output 

Mkrishna
Contributor
Contributor
Author

Hi vboppudi,

thank you for your answers , i got a proper output .

Anonymous
Not applicable

Hi All,

 

i have to generate the sequnce numbers for each record with tJava, tJavaFlex.

 

Thanks & Regards,

Jaineesh.

TRF
Champion II
Champion II

Numeric.sequence is here for this purpose