Probably something very basic, but it leaves me a bit clueless right now.
I have a field, which is attached to a global that I use as an input field for a search. Now, the search needs an ID (Integer) as input. the question is now: How to evaluate the input in the field, to see if it is an integer?
Secondly: Is it possible to put a mask or something over the field so the user can only type numbers into the field?
Thirdly: is it possible to evaluate the value typed into the field, while it’s being type? With this one I mean: evanualte the total value in the field after each character entered into the field
Last but not least : Based on the evaluation in 3 launch a method (for example to change the text in the field to Bold or another color)
I have a field, which is attached to a global that I use as an input field for a search. Now, the search needs an ID (Integer) as input. the question is now: How to evaluate the input in the field, to see if it is an integer?
If you want to check if all characters are a number you can do value.match(yourregularexpression) to find out. If you want to filter an integer you can do utils.stringToNumber(value) and you have your integer.
Secondly: Is it possible to put a mask or something over the field so the user can only type numbers into the field?
No (and this is a not yet if it was up to me… but it isn’t )
thirdly: is it possible to evaluate the value typed into the field, while it’s being type? With this one I mean: evanualte the total value in the field after each character entered into the field
No, not as far as I know. It is only after changing the values that you can do your evaluation…