Coerce uppercase on field entry/edit

I am looking for the best solution to coercing upper case on field entry and edit. I would like the behavior to be consistent when in Find mode or data entry/update mode.

I have been reviewing forum posts and studying the users guide and reference manual.

The fields in question have dataproviders that are database columns, of type TEXT. The form fields have displayType TEXT_FIELD.

What I would like is for the fields on the form to always display name and address text in upper case, regardless of whether it is entered in upper case or lower case. And I would like any data inserted or updated into the database through the field to be coerced to upper case. And I would like for the coerce-to-upper-case to work consistently in either Find mode or data entry/update mode. And I would like consistent behavior in the web client and the smart client.

Perhaps that is just too much to ask, but, I would like to understand what I can have and what I cannot have.

So far, I can see that the form field format mask has some effect, but, I haven’t been able to make it do enough of what I want to consider it useful.

I can imagine using an onFocusLost handler to coerce upper case after-the-fact. I can imagine using a dataprovider conversion to force case in the database. I can imagine using a keyboard event handler to upcase each keystroke, but, it doesn’t look like Servoy has such a handler built-in.

I have been looking at a number of forum entries, and it appears that the dataprovider conversion is probably the preferred solution for the data entry/update mode, but no help for Find mode.

I would appreciate any further information. It seems to me like this would be a common requirement, and I am curious that there doesn’t appear to be a well documented and well known approach.

with the ‘|U’ format on textfields you should come quite far then we will convert everything to upper case on entry.
Besides that you can use a GlobalMethodConverter to do it your self at the moment the user leaves the field.

But both of those dont work for find mode.
So for that you have to change the data at the moment they want to search (for example onsearch command)
to make sure that the search is case insensitive or all converted to uppercase.

For searching, you can also act at the database level and use a case-insensitive collation.