Skip to main content
Participant
February 4, 2023
Question

the expression engine does not evaluate floats lower than 8.0 with padding...

  • February 4, 2023
  • 3 replies
  • 246 views

the expression engine does not evaluate floats lower than 8.0 with padding...
08.20 -> success
07.15 -> error

This topic has been closed for replies.

3 replies

Dan Ebberts
Community Expert
Community Expert
February 4, 2023

I think you might be bumping into the legacy way javascript handles inputting octal numbers, where you have a leading zero and a digit less than 8. So 051, for example, would be interpreted as octal 51 (decimal 41). But if you have a leading zero and a digit less than 8, and after that you have a digit greater than 7 or a decimal point--it doesn't know what to do with that "illegal" octal number. I think you'll be OK if you keep everything in quotes and then use parseFloat, like this: parseFloat("07.01").

jmBillardAuthor
Participant
February 4, 2023

it's a simple stock variation chart template...
for sanity reasons data prep padding was necessary 😅

and it all colapses with values lower than 7am...

Mylenium
Legend
February 4, 2023

Not sure what you're trying to do here. The valuse would need to be netered as stings in the source text property or converted using string methods. Everything else is just reliance on the engines' internal catch-all mechanics, which is kinda sloppy, anyway.

 

Mylenium