by Gaby_h » 25 August 2013, 4:57
I had already tried onUpdatingRow. Unless I am not understanding how this event works, my finding is that it triggers only when the user changes row. It does not trigger when the user tabs out of the field and moves to the next one. To me adding the mask characters only when the data is sent to the server is not the best solution for the user.
In my current applications, when I apply a mask to a field like for expl: FX#####V (FV 5digits V).
1) When the user tabs into the field the length is enforced, i.e. the user cannot enter more that 5 digits, even if the actual size of the field in the backend is 20. With Inde when I apply the mask to a 15char field and I enter 77895 the result I get is FX77895VVVVVVVV absolutely not desirable at least from a visual point of view. I have to use a function like maxLength() in another event to limit the size to 8.
2) I have the choice to store or not store the mask characters (FX and V)
Also the above can be done dynamically as follows :
Suppose I have vendorid field and filenbr field (30 char) where I want to apply a mask:
if vendorid =v33 apply mask Q######T in filenbr
=v22 K#########
=v17 ###-####-####-####
=v19 AAAAA
etc...
As soon as the user enters the vendori ID, the fielnbr field is automatically formatted with specified mask without extra characters, the data is saved exactly as shown on the screen, all the above with very little coding and no use of events.
Can something similar be done in Inde and how?