Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
AlexWest
Creator
Creator

Enter symbols (text, numbers) into the field

Hi!

I pictured my question (attached).

Well I have a field which has to contain a 12-digit numeric record.

But some of the records are 11-digit .

As you can see on the picture there is "0"-symbol is absent. But I need to add it to the records which 11-digit.

Is it possible? If yes, how can I do this?

Labels (1)
1 Solution

Accepted Solutions
Afa_Momin
Contributor II
Contributor II

Try the following code:

if(len([Field_Name])=11,0&[Field_Name],[Field_Name])

View solution in original post

3 Replies
Afa_Momin
Contributor II
Contributor II

Try the following code:

if(len([Field_Name])=11,0&[Field_Name],[Field_Name])

AlexWest
Creator
Creator
Author

Hi!

Sorry for late answer,

It's working well. Thanks a lot for your help!))

Vegar
MVP
MVP

An alternative solution is to format the  field as an 12 digit number. You can try this:

NUM(Field_Name, '000000000000')

If you have trouble interpreting the field as a number then also this could work:

right('0'&Field_Name, 12)