cancel
Showing results for 
Search instead for 
Did you mean: 

JavaScript Conversion File Not Work

former_member754233
Discoverer
0 Kudos
259

Hi All,

I am trying to remove zeros for records that are 18 characteres in size, example:

000000000000650131

i am using the following furmula in the internal column of the conversion file but it does not work:

*If(js:%external%.lenght = 18 then js:%external%.substring(12,6);%external%)


the parameter CONVERT_INTERNAL in the transformation file = NO.

the warning in data manager for dimension is

"%EXTERNAL%"

thanks for your help!!!!!

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Use the following:

js:(%external%.length == 18) ? %external%.substr(12,6) : %external%
former_member754233
Discoverer
0 Kudos

thanks Vadim, it worked fine

Answers (0)