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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ptremblay
Contributor
Contributor

tMap: Padding Number.

Bonjour,
I'm no Java specialist.
I would like to have my Numeric.sequence in the following fix format: "S00000000" (with padding "0").
sequence 0 -> S00000000
sequence 1 -> S00000001
..
sequence 111 -> S00000111
etc.
I can convert a number to a string but I cannot make it in this precise format.
Thanks.
PM
Labels (3)
2 Replies
amaumont
Contributor III
Contributor III

Try this:
"S" + new java.text.DecimalFormat("00000000").format(111)
ptremblay
Contributor
Contributor
Author

It works now.
This also teaches me on how to use java within the Expression Editor.
Many thanks.
PM