Page 1 of 1

Editmask

Posted: Tue Nov 27, 2018 4:42 pm
by dominique
Hi

We often have difficulties to implement the required Field "editmask".
We have the following field specification:

1. If the field is Null a placeholder value should be displayed
2. If the field is 0 the value should be displayed as 0.00 or 0,00
3. Two decimal digits allowed

Each approach wasn't successfull.
Result:
1. We can't show a placeholder
2. We can't show a 0.00 value as '0.00' (only as '.00')
3. Sometimes the setfocus is not correct. Means: sometimes the value is selected, sometimes the focus is on the end of the field and you first have to delete the .00 value to enter a new number


We played with the following combinations:
editmask.jpg
editmask.jpg (31 KiB) Viewed 11738 times
QuickExport_edit.zip
Quickimport example
(10.93 KiB) Downloaded 1280 times

Does anyone have the solution?

Thanks for help


Update after applying EPC142030:
EPC142030 solves the problem with "placeholder". The problem with unnatural focus behavior for fields with their own editmasks is still there.

Re: Editmask

Posted: Wed Nov 28, 2018 12:18 pm
by Dominik
1. The placeholder issue is fixed in the latest EPC (EPC142030). The field will need to have ASQN attribute, and the placeholder will be shown when the field value is *SQLNULL
2. Leading zero display is configured through the System setting under System Information/Display and Print controls/Show leading zero. Then use Edit mask 3 for the field definition to display the field as 0.00
3. There is a bit of an issue with the setting of focus when you use a custom edit mask such as ' 0 . -'. This seems to be due to the edit mask displaying the field with leading spaces, and when you click on the field, it reverts to edit mode without leading spaces. But the mouse click is interpreted at the point you clicked (which will be different when it is displayed without the spaces). Our recommendation in this case is not to use a custom edit mask in this case - you can achieve the display you want using edit mask 3 if you set the leading zero to display (as per point 2)

Re: Editmask

Posted: Wed Nov 28, 2018 5:23 pm
by dominique
Thanks Dominik for your explanations

It was a bit hard to find the System Information Display And Print Controls. Until today I didn't know you can doubleclick/open the parent "System Information" in the Repository. It is well hidden ;)
Bild000051.jpg
Bild000051.jpg (29.37 KiB) Viewed 11695 times
Thanks

Re: Editmask

Posted: Wed Nov 28, 2018 6:14 pm
by Dominik
Sorry if that part wasnt clear! The setting for leading zeros is one that is often overlooked - it is from back in the days of Functions and Processes; VL Web honors the setting, but it isnt all that intuitive to find.