So,
I am using the replace function in a module to define a variable, but it keeps changing the final numbers, why?
So,
I am using the replace function in a module to define a variable, but it keeps changing the final numbers, why?
My guess is that your number is too large.
According to “Number” data type in the documentation,
For some numerical items, Make may validate the input for a specified range (the minimum or maximum allowed value).
The value of the JavaScript Number.MAX_SAFE_INTEGER
constant is 9007199254740991 —
That is approximately 16 digits, while your number is longer than that, hence the truncation (and padding of the truncated portion with zeros).
The correct workaround is to store the number as a string.
It worked, just added a data store and the item as text.