Migrating from PB 12.1 to PB 2017 R2, I found a behaviour change with the setcolumn()-function of the datawindow.
In some freeform datawindows I implemented to skip some columns, when entering or tabbing through the taborder
Example:
[lastname]
[forename]
[secondname] <-- this field is skipped when tabbing through the freeform
[password] <-- this field sometimes is protected by an expression: if (role='admin', 0, 1)
[role]
for skipping the field i use this code in the itemfocuschanged()-event
itemfocuschanged(row, dwo, data):
choose case dwo.name
case "forename"
this.post event ue_setcolumn("password") // posted to avoid infinite loops (see itemfocuschanged help)
end choose
ue_setcolumn(as_column):
this.SetColumn(as_column)
After leaving column [forename] ...
...in PB 12.1:
Focus is on [password], if not protected
Focus is on [role], if [password] is protected
Conclusion: Setcolumn() automatically sets the next editable column in the taborder, if the colum is protected.
...in PB 2017 R2:
Focus is on [password], if not protected
Focus is "lost", if [password] is protected <-- this is the error
Conclusion: Setcolumn() DOES NOT automatically set the next editable column. A getcolumn() after the Setcolumn() returns 0.
The returnvalue of Setcolumn() is always 1.
Has anybody experienced this issue?
Regards, Martin