What support is there for formatting/de-formatting text inputs?

greg kalbach shared this question 6 years ago
Answered

FWIW - I'm a total newbie to JustInMind, and am exploring its capabilities.


I have 4 text boxes that should contain dollar values ($123,456).


I have a label field that I want to show the sum of the four values, again formatted as dollars. The label should be updated when any of the four text boxes change.


Looks like the expression engine won't parse formatted values other than integer and decimal so the label never gets updated. Label also fails to update if any of the textboxes happen to be blank (though I'd expect blank to be translated as a 0).


My expression is just a simple sum of the four inputs.


is there any way to accomplish this?


Form


42ffc6a7a1142e401f82e438a6c7e66a


Expression


Comments (1)

photo
1

You need to use the substring function to leave the dollar sign out of the expression. Take a look at the Design Patterns example at the screen called Format Quantity (you can download the .vp and see how it was made)