cancel
Showing results for 
Search instead for 
Did you mean: 

Eval method behaving strangely

mbostrom_dtiq
New Contributor II

Hello. This is very strange but we have a pipeline that has pipeline parameters / arguments. 1 for month and the other year:

image

This works fine when the months is 7 or less (july). once you put the param = 08 for august and year 2020 this strange error occurs. we are using the eval() method and mapping eval(_month) to month variable and eval(_year) to year variable. this makes absolutely no sense!

image

Using 07 2020 there are no errors or any months prior to it:

image

What gives?

2 REPLIES 2

cjhoward18
Employee
Employee

@mbostrom_dtiq

a number prefixed with 0 that is not a decimal(0.0004) is using the octal numbering system, which is a base-8 numbering system in which there are only digits 0-7. An Integer must lead with non 0 represented by this regex:
0 | [1-9][0-9]*

whereas octal is: 0 [0-7]+

cjhoward18
Employee
Employee

@mbostrom_dtiq

can you use
parseInt(_month) instead ?