My objective is to have a table column that can support both dollar amounts or percentages. I do this by having a text field which I parse. This works great but there is unexpected result if I trim the text.
Trim("9% ").toNumber() results in 9
ToNumber("9%") results in 9%
how ToNumber() works with text values: extracts the first set of digits it may find and returns those as a numeric, otherwise just returns the input.
how Coda tries to type-guess what you’re entering into a cell.
When you enter 9% without a trailing space in your “Expected Behavior” table, Coda treats it not as a text value but a percent value already. You can see the evidence here: