Is there any solution in Integerfiel to generate an Amount Format? but in textField my logic is working but my validations is not working. My validation is only numbers can accept in textField.
Discussion posts and replies are publicly visible
For simple number validation within text field you can use cleanwith() function. Generally regex is used for more complex validations that involve pattern matching like email formats, etc.
a!textField( label: "Formatted Number", value: if( or(isnull(ri!formattedNumber), ri!formattedNumber <> cleanwith(ri!formattedNumber, "1234567890.,")), ri!formattedNumber, text(ri!formattedNumber, "##,###.##") ), saveInto: ri!formattedNumber, validations: { if( ri!formattedNumber <> cleanwith(ri!formattedNumber, "1234567890.,"), "Please input numbers only", {} ) } )
remove that false in if statement and add null and try it
hi avinash. i try that solution but i gave me an error.
...
why not try the logic mentioned by Hrishikesh Dixit it works good
I also tried that. same error
I also tried this but I have problem says "Interface Definition: Expression evaluation error at function 'cleanwith' [line 112]: A null parameter has been passed as parameter 1."
add one more if over your existing if statement to handle null values
Workig but the validation imessage is not popping up
can u insert your code to check it out