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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
KamSH
Contributor II
Contributor II

Numeric.sequence Troubleshooting

Hi guys, let's say I have a column called Check_DuplicateID.

I'll be using this Column to check for any repeating rows, for each repeating row, I'll increment the sequence number by 1. The starting number is 1.

The values will then be mapped to a column called Assign_CourseId_Append.

I input this code through the tJavaRow component like so:

0695b00000smPK8AAM.png

The thing is, for all the rows in my data, the starting number is wrong immediately. Take this screenshot below as an example:

0695b00000smPJtAAM.png

The first row is already 11 instead of 1 and continues on to 19

This is another example:

0695b00000smPKDAA2.png

The first row starts with 3 instead of 1.

How do I go about troubleshooting this? What could potentially cause this?

Labels (3)
1 Solution

Accepted Solutions
KamSH
Contributor II
Contributor II
Author

Hi Shong,

 

Thanks for telling me this.

I indeed have the same expression running twice in the same job, but assigned for different columns because of job design requirements.

I did not know that you arent supposed to do that.

 

Was able to solve this by adding a different postfix to the expression, so something like:

output_row.Assign_CourseId_Append = Numeric.sequence(input_row.Check_DuplicateID + "_Assign_CourseId_Append", 1, 1)

With this, the data turned out fine running in the same job.

View solution in original post

2 Replies
Anonymous
Not applicable

Hi

Go check if you use the same expression multiple times in the same job or you run the same subjob using multiple thread.

There's no reason why it starts at 11, so I'd like to check out your job design if you still can't find the issue.

 

Regards

Shong

KamSH
Contributor II
Contributor II
Author

Hi Shong,

 

Thanks for telling me this.

I indeed have the same expression running twice in the same job, but assigned for different columns because of job design requirements.

I did not know that you arent supposed to do that.

 

Was able to solve this by adding a different postfix to the expression, so something like:

output_row.Assign_CourseId_Append = Numeric.sequence(input_row.Check_DuplicateID + "_Assign_CourseId_Append", 1, 1)

With this, the data turned out fine running in the same job.