Formatter toString displays as [object Object]

Wappler Version:v5.0.3
Operating System:win10

I have a table with a column like this:
<td dmx-text="(Retail * 4.5).round(2).toString().replace('.', ',')"></td>

I replace the comma with a point since that’s the format where I live, but since I couldn’t do that to a number I had to first change it to string and that causes an issue since the last update…

Instead of displaying it as you’d expect it shows this:
image

It doesn’t deal with the value showing as Object… using .toString() but you could use the .formatNumber() formatter, on the numeric value, which can round to x decimal places and set the separator (decimal) as a comma:

1 Like

oh that basically does the same thing with just one command, nice!
Yeah it doesn’t deal with the bug but it does fix the issue I’m having

1 Like

Bump.
@patrick Issue exists in Wappler 5.1.1
Simple expression 5.toString() returns [object Object] instead of numeric value as string.
The issue also exists for string values - 'abc'.toString() returns the same.

Here an update that should fix the toString formatter.

dmxAppConnect.zip (26.6 KB)

1 Like

That works. Thanks.

Fixed in Wappler 5.1.4

This topic was automatically closed after 47 hours. New replies are no longer allowed.