There is not a built-in way to restrict the number of digits in the numeric entry field, but you are welcome to share that feature request with our developers here.
If anyone in the community has a solution for this design, hopefully they will chime in to assist you here.
I haven't tested this to be absolutely sure, but you could use a trigger to change the value of the variable (say var x) to 0 when variable var x changes, if var x is < 0 or var x is > 99.
You can also include additional triggers to notify about the "validation check" in the form of : Change state of Caption "invalid number" to Normal when variable var x changes, if var x is 0, and Change state of Caption "invalid number" to Hidden when variable var x changes, if var x is not 0.
What Alexandros says is right, but you have to remember that SL does no checking of variables until the field has lost focus,i.e. the user clicks on something else on the screen. That means you can't set the entry to stop or raise an error message after 2 digits are entered. It can only happen after the user indicates they are finished entering.
3 Replies
Hi Mohd!
There is not a built-in way to restrict the number of digits in the numeric entry field, but you are welcome to share that feature request with our developers here.
If anyone in the community has a solution for this design, hopefully they will chime in to assist you here.
I haven't tested this to be absolutely sure, but you could use a trigger to change the value of the variable (say var x) to 0 when variable var x changes, if var x is < 0 or var x is > 99.
You can also include additional triggers to notify about the "validation check" in the form of : Change state of Caption "invalid number" to Normal when variable var x changes, if var x is 0, and Change state of Caption "invalid number" to Hidden when variable var x changes, if var x is not 0.
What Alexandros says is right, but you have to remember that SL does no checking of variables until the field has lost focus,i.e. the user clicks on something else on the screen. That means you can't set the entry to stop or raise an error message after 2 digits are entered. It can only happen after the user indicates they are finished entering.
This discussion is closed. You can start a new discussion or contact Articulate Support.