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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Generate Numeric Sequence using Variable (Not Function)

I need to generate Numeric seq. ( integer ) without using Numeric.Sequence() function.

for Example :

input Data : only 1 column (string ) "name" , has 5 values , A,B,C,D,E

Output :  id(int)  Name(string)

                1           A

                2          B

                  ........

                5         E.

I need to use variable , expression using tMap (or other suitable components).

 

Regards 

Subhadeep

Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi,

 

     May I know the reason why internal numeric sequence is a problem for you?

 

     If it is a scenario where you would like to start from last loaded sequence number (like in a DB), you can pick that value first from DB and load to a context variable. Then you can start the sequence from the loaded value instead of 1.

 

Numeric.sequence("s1",context.last_value,1)

 

Warm Regards,

 

Nikhil Thampi

Anonymous
Not applicable
Author

Hi nikhilthampi, 

 

the scenario demands to avoid the inbuilt function , can you please give me the solution using variables in expression builder ?

 

Thanks in advance .

 

Regards 

Subhadeep 

Anonymous
Not applicable
Author

Hi Subhadeep,

 

     Could you please me more context why the sequence function cannot be used for your use case scenario?

 

     If you could explain your specific scenario in detail, we can provide a better solution. All normal scenarios can be handled by above function including the sequence number generation from a specific number instead of 1.

 

     I am really interested in a scenario where this function should not be used.

 

Warm Regards,

 

Nikhil Thampi