1 TRIGGER PROCEDURE FOR ASSIGN OF Office.ThisOffice
OLD VALUE old-value.
3 IF ThisOffice
<> old-value
THEN DO:
4 IF ThisOffice
= yes
THEN DO:
5 ON ASSIGN OF Office.ThisOffice
OVERRIDE DO:
6 /* nothing
- we don't want to call ourselves recusively
! */
9 DEFINE BUFFER temp-office
FOR Office.
10 FOR EACH temp-office
WHERE temp-office.ThisOffice
= yes
11 AND RECID(Office
) <> RECID(temp-office
):
12 temp-office.ThisOffice
= no.
15 /* Revert back to this trigger procedure
*/
16 ON ASSIGN OF Office.ThisOffice
REVERT.
19 MESSAGE "You should assign a new office to be 'This'" SKIP
20 "and all other offices will be cleared"
21 VIEW-AS ALERT-BOX ERROR.