#4 (per stuk) is the total amount of the part (raw material) divided by the quantity to make for this order. Works fine, but sometimes I get a output like 410.111111111111 - and I would like to round that to 410.1
These 2 fields (parts_booked & quantity) are a string by default, and I tried to change it to number like this:
But as soon as I save that, nothing changes in the field expression, it stays: parts_booked / quantity. When I reopen with the magic wand, the value type is back to string again.
Also I have tried adding .toNumber() to the field expression, but then it gives an empty table column.
Hello Nevil,
You don’t change the data type from there. There is a formatter called “To Number” which makes your string value a number.
So first apply the To Number formatter to the value and then round it
And please do this on the page, not inside the table generator.
By the expression and its tag, I meant the <td></td> that’s called an HTML tag.
The expression is the dmx-text… part
The warning in the console says any (or both) of your values are numbers and not strings. So you can’t add to number formatter to a value which is already a number.