Editmask

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
dominique
Posts: 31
Joined: Mon May 29, 2017 4:16 pm
Location: St. Gallen, Switzerland

Editmask

Post by dominique » Tue Nov 27, 2018 4:42 pm

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 4659 times
QuickExport_edit.zip
Quickimport example
(10.93 KiB) Downloaded 341 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.

Dominik
Posts: 17
Joined: Fri Jun 10, 2016 12:14 pm

Re: Editmask

Post by Dominik » Wed Nov 28, 2018 12:18 pm

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)
Last edited by Dominik on Wed Nov 28, 2018 6:11 pm, edited 1 time in total.

dominique
Posts: 31
Joined: Mon May 29, 2017 4:16 pm
Location: St. Gallen, Switzerland

Re: Editmask

Post by dominique » Wed Nov 28, 2018 5:23 pm

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 4616 times
Thanks

Dominik
Posts: 17
Joined: Fri Jun 10, 2016 12:14 pm

Re: Editmask

Post by Dominik » Wed Nov 28, 2018 6:14 pm

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.

Post Reply