Classic ABL: How to prevent changing the current record of a

Posted by cverbiest on 06-Nov-2018 11:29


I need to prevent the user from changing the current row (=record) of a classic ABL browse widget.

The browse must remain enabled as most of the time the user is allowed to  

I coded the test in the value-changed trigger and return no-apply if a certain condition is met, (IRL the test detects pending unsaved changes).

return no-apply on value-changed of a browse widget does not work. the row and record are changed

Is this a bug or expected behaviour. If expected, what is the correct event to prevent changing the current row (record) of a browse widget ?

return no-apply on entry of the browse does not work either, the row is visually changed before the browse in entered

iteration-changed doesn't seem to do anything.

What event should I subscribe to to be able to cancel (return no-apply) changes to the current row+record[View:/cfs-file/__key/communityserver-discussions-components-files/19/browse_5F00_noapply_5F00_valuechanged.w:320:240]

I'll attach my sample browser on the sports2000

All Replies

Posted by cverbiest on 06-Nov-2018 11:30

Attempt to re-add missing screenshot

Posted by James Palmer on 06-Nov-2018 11:44

I think it's on VALUE-CHANGED of the browse, something like that, but you can set the READ-ONLY attribute conditionally. That way the browse stays enabled, but you can't change, and therefore submit changed values. I don't have an example to hand, but I've worked with various systems that do just that.

Posted by cverbiest on 06-Nov-2018 12:14

Hi James

thanks for your reply, unfortunately value-changed is too late,

I hope that this time my screenshot is visible.

the customer and the browser already show the newly-navigated-to record. browse was on customer 7 before.

With on entry of browse the behaviour is slightly better, the customer buffer still contains customer 7 but visually the browse is also on the new row.

Posted by James Palmer on 06-Nov-2018 12:49

You're right. I think it's ROW-ENTRY, you set the READ-ONLY at that point and the user can't change values. It's been a while!

Posted by James Palmer on 06-Nov-2018 12:50

Did a quick Google - this might help:

Posted by Patrick Tingen on 06-Nov-2018 14:10

In cases like this I prefer to disable the browse and re-enable it once the changes have been either saved or cancelled.

This thread is closed