Tag Archives: @TextToNumber

@TextToNumber Decimal Warning

If you run this formula in traditional Domino

@Text(@TextToNumber(“20,40”)*2)

You will get 80,40 back into the field

But if you run this in some XPage Code you will get

0

Why is this you might ask, well probably because javascript do not recognize comma as a decimal delimiter

So you need to change the formula to this.

@Text(@TextToNumber(@ReplaceSubstring(“20,40″,”,”,”.”))*2)

Then you will get 40,8 back. Not that when you do @Text() on the number the comma is back 😉