Reputation: 1
I need to disable 2 buttons whenever the user clicks on an editable cell of a static browser. This needs to happen in 4 columns (there are other non-editable columns). For this I need to get the column name. I tried placing the code in the browser's ROW-ENTRY trigger, and this works well, EXCEPT for the FIRST time I click into an editable cell, when I get a 10068 error (Load attribute in a chained-attribute expression (a:b:c) must be type handle or a user-defined type and valid 9not UNKNOWN). I have tried using a handle instead of the browsers name, but didn't make any difference. After the first time, the code works and I can get the columns' name without any errors.
The code inside the ROW-ENTRY trigger is as per below:
IF br-people:CURRENT-COLUMN:LABEL = "Name" OR
br-people:CURRENT-COLUMN:LABEL = "Surname" OR
br-people:CURRENT-COLUMN:LABEL = "Age" OR
br-people:CURRENT-COLUMN:LABEL = "Gender" THEN DO:
bUp:SENSITIVE = FALSE.
bDown:SENSITIVE = FALSE.
END.
I'm using OpenEdge 11.4. Any insights will be greatly appreciated.
Upvotes: 0
Views: 505
Reputation: 7192
You can also use the ENTRY event of the Browse cell:
ON ENTRY OF <table>.<field1> BROWSE <browse-name>
OR ENTRY OF <table>.<field2> BROWSE <browse-name>
OR ENTRY OF <table>.<field3> BROWSE <browse-name>
OR ENTRY OF <table>.<field4> BROWSE <browse-name>
DO:
END.
Depending on your requirements (you mention "click"), you could also use the MOUSE-SELECT-CLICK event. That will fire whenever the use clicks in the cell - regardless if the field already has focus or not.
Upvotes: 0
Reputation: 1498
Unfortunately I don't have it installed to test, but try testing VALID-HANDLE(br-people:CURRENT-COLUMN) before the other conditions. If I'm not mistaken, this fires multiple times and it's possible in one of them it's not filled.
Upvotes: 1