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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
REjaz1662272866
Contributor
Contributor

Fixed length ID number

How to generate a fix sized number: "SN-0001...SN-1000"? Please help!!

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

try this expression on tMap or tJavaRow, it will generate a fixed sized number for each row.

"SN-"+String.format("%04d", Numeric.sequence("s1",1,1))

 

Regards

Shong

View solution in original post

1 Reply
Anonymous
Not applicable

Hi

try this expression on tMap or tJavaRow, it will generate a fixed sized number for each row.

"SN-"+String.format("%04d", Numeric.sequence("s1",1,1))

 

Regards

Shong