itemerror event triggered on a decimal field
- New
- Advice
-
Sylvie Bouttelisier
- PowerBuilder
- Saturday, 13 December 2025 10:32 AM UTC
Hi
I want to learn more behind the behaviour of the itemerror event. What are the validation rules?
F.ex. PB2025 build 3726
I have a datawindow connecting to sql anywhere 17
with a column decimal(20,5)
edit.format and format '#,##0.00'
na validation expression and message is set in the dw
I use the KeyDecimal! Key (numeric keybord)
The regional settings are decimal point.
1/ I open the datawindow, type in 0.01 and validation passes. I don't close the datawindow.
2/ I change the regional settings of windows to comma separator instead of point.
The value in the dw changes to 0,01
3/ I type a new value in the field: 0.02 (with the KeyDecimal! still is point)
ItemError is fired, validation is not passed
I check in the ItemError event the dw.object.column.edit.format and dw.object.column.format => the formats are still '#,##0.00'
Why is the validation not passed?
4/ When I close the dw and reopen, I type 0,01 (the KeyDecimal! is changed to comma) and validation passes again.
When I use the KeyPeriod! to type 0.01, validation is again not passed
No matter what, I always want to use the point as a decimal separator.
So when the app starts I check the regional settings and changes the user settings to decimal point.
But somehow along the day the user gets the situation I describe above (point 3) and can't save. They have to close their work and restart their work.
Kind Regards
Sylvie
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.