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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sequence

my requirement is  i created two output flows in tmap  each flow sequence generated like("s1",1,1)i want 1-6 in first(6 records are there)

another flow also ("s1",1,1)7-10 in this( 3 records in this)

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

@rchinta 

 

  If you are looking for second sequence to start with last number of first sequence, below are the steps.

 

a) Generate the first sequence in normal fashion eg ("s1",1,1)

b) Pick the last value of current sequence (or after tmap, do a max of sequence id) and store in a context variable (context.last_seq_max_number) with integer data type

c) In the next sequence, use  ("s2",context.last_seq_max_number,1)

 

Now the second sequence will start with 7.

 

Hope I have answered your query. I would suggest you to create a sample job and test the steps yourself to practice your learnings. Could you please mark the topic as resolved since the query has been answered now? Kudos are also welcome 🙂

 

Warm regards,

 

Nikhil Thampi

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Hello,

You can achieve this Auto-Increment in tMap.

Please create a variable (var1) with this expression :Var.var1==0 || Var.var1>=6 ? 1 : Var.var1+1

Let us know if it is OK with you.

Best regards

Sabrina

 

 

Anonymous
Not applicable
Author

could please explain in detail
Anonymous
Not applicable
Author

please provide one example job design
Anonymous
Not applicable
Author

Hello,

I will create a demo job and them come back to you as soon as I can.

best regards

Sabrina

Anonymous
Not applicable
Author

Hello,

Could you please take a look at my screenshots for details?

Feel free to let us know if it is what you are looking for.

0683p000009M0ze.png0683p000009M19O.png0683p000009M1Au.png

Best regards

Sabrina

Anonymous
Not applicable
Author

actually i want 7 after 6
Anonymous
Not applicable
Author

@rchinta 

 

  If you are looking for second sequence to start with last number of first sequence, below are the steps.

 

a) Generate the first sequence in normal fashion eg ("s1",1,1)

b) Pick the last value of current sequence (or after tmap, do a max of sequence id) and store in a context variable (context.last_seq_max_number) with integer data type

c) In the next sequence, use  ("s2",context.last_seq_max_number,1)

 

Now the second sequence will start with 7.

 

Hope I have answered your query. I would suggest you to create a sample job and test the steps yourself to practice your learnings. Could you please mark the topic as resolved since the query has been answered now? Kudos are also welcome 🙂

 

Warm regards,

 

Nikhil Thampi