觸發器執行順序:
1.當開啟FORM時:
(1)PRE-FORM
(2)PRE-BLOCK(BLOCK級)
(3)WHEN-NEW-FORM-INSTANCE
(4)WHEN-NEW-BLOCK-INSTANCE
(5)WHEN-NEW-RECORD-INSTANCE
(6)WHEN-NEW-ITEM-INSTANCE
2.當填寫一行記錄完成後,游標移動到下一條記錄的時候:
(1)WHEN-VALIDATE-RECORD
(只將填寫的記錄與資料庫中已存在的記錄作唯一性的驗證,如果只是頁面上的資料重複而資料庫中沒有與其重複的值則不會報錯.)
(2)WHEN-NEW-RECORD-INSTANCE
(3)WHEN-NEW-ITEM-INSTANCE
3.當點擊“儲存”時
(1)WHEN-VALIDATE-RECORD
(將頁面上的所有資料提交到資料庫,若頁面上有重複的資料,則提交第一次時成功但只是將資料先寫到資料庫中一類似暫存資料表的地方,在提交第二條重複記錄的時候報錯,執行交易回復,原來執行成功的指令也將被撤消)
(2)PRE-INSERT
(3)ON-INSERT
(4)POST-INSERT
(5)POST-FORMS-COMMIT
(6)PRE-BLOCK(BLOCK級)
(7)KEY-COMMIT
(8)WHEN-NEW-ITEM-INSTANCE
4.當游標移動到當前資料區塊中已經顯示的行上時:
(1)WHEN-REMOVE-RECORD
(2)WHEN-NEW-RECORD-INSTANCE
(3)WHEN-NEW-ITEM-INSTANCE
當在該行上的不同ITEM移動時:
(4)WHEN-NEW-ITEM-INSTANCE
5.當要進行修改時(在記錄中的某個項上進行了修改時):
(1)ON-LOCK
6.在修改完成後進行儲存時:
(1)WHEN-VALIDATE-RECORD
(2)PRE-UPDATE
(3)ON-UPDATE
(4)POST-FORMS-COMMIT
(5)PRE-BLOCK(BLOCK級)
(6)KEY-COMMIT
(7)WHEN-NEW-ITEM-INSTANCE
7.刪除一條記錄時:
(1)ON-LOCK
(2)WHEN-REMOVE-RECORD
(3)KEY-DELREC
(4)WHEN-NEW-RECORD-INSTANCE
(5)WHEN-NEW-ITEM-INSTANCE
8.F11查詢過程:
(1)WHEN-CLEAR-BLOCK
(2)WHEN-NEW-RECORD-INSTANCE
(3)WHEN-NEW-ITEM-INSTANCE
在輸入查詢條件後點CTRL+F11:
(4)PRE-QUERY
(5)WHEN-CLEAR-BLOCK
(6)POST-QUERY
(7)WHEN-NEW-RECORD-INSTANCE
(8)WHEN-NEW-ITEM-INSTANCE
9.CRRL+F11:
(1)WHEN-CLEAR-BLOCK
(2)PRE-QUERY
(3)WHEN-CLEAR-BLOCK
(4)POST-QUERY(每查一條記錄,觸發一次)
(5)WHEN-NEW-RECORD-INSTANCE
(6)WHEN-NEW-ITEM-INSTANCE
10.從查詢狀態(F11)轉為輸入狀態(F4)時:
(1)WHEN-CLEAR-BLOCK
(2)KEY-EXIT
(3)WHEN-NEW-RECORD-INSTANCE
(4)WHEN-NEW-ITEM-INSTANCE
11.手電筒查詢過程:
(1)QUERY_FIND(BLOCK級)
輸入查詢條件後,點擊“查詢”按鈕:
(2)WHEN-CLEAR-BLOCK
(3)PRE-QUERY
(4)WHEN-CLEAR-BLOCK
(5)POST-QUERY
(6)WHEN-NEW-RECORD-INSTANCE
(7)WHEN-NEW-ITEM-INSTANCE
12.點擊“New”時:
(1)WHEN-NEW-RECORD-INSTANCE
(2)WHEN-NEW-ITEM-INSTANCE
13.點擊“EditField”時:
(1)KEY-EDIT
14.點擊“WindowHelp”時:
(1)KEY-HELP
15.點擊“ClearRecord”時:
(1)WHEN-REMOVE-RECORD
(2)POST-QUERY
(3)WHEN-NEW-RECORD-INSTANCE
(4)WHEN-NEW-ITEM-INSTANCE
16.點擊F4關閉時:
(1)KEY-EXIT
(2)POST-FORM
17.點擊“CloseForm”按鈕關閉時:
(1)KEY-EXIT
(2)POST-FORM
18.點擊“Translations”按鈕時:
(1)TRANSLATIONS
19.點擊小叉號關閉時:
(1)WHEN-WINDOW-CLOSED
(2)CLOSE-WINDOW
(3)KEY-EXIT
(4)POST-FORM
20.選中LOV列表:
(1)KEY-LISTVAL
(2)WHEN-NEW-ITEM-INSTANCE
21.選中記錄前面的小條時:
(1)WHEN-NEW-RECORD-INSTANCE
(2)WHEN-NEW-ITEM-INSTANCE(資料項目級)
(3)WHEN-NEW-ITEM-INSTANCE
22.游標上下移動時:
(1)WHEN-NEW-RECORD-INSTANCE
(2)WHEN-NEW-ITEM-INSTANCE