1: When exiting form, Check the form status.
2: If the status is changed, then display the customized alert.in a KEY-EXIT trigger at form level, enter the following code:
declare
button_val number;
begin
-- Perform validation at item level to update :SYSTEM.FORM_STATUS.
validate(ITEM_SCOPE);
-- Check the record status
if(:SYSTEM.FORM_STATUS = 'CHANGED') then
button_val := show_alert('ask_commit');
if button_val = ALERT_BUTTON1 then
-- If user chooses to commit changes...
commit_form;
exit_form;
elsif button_val = ALERT_BUTTON2 then
-- Do nothing if user cancels...
null;
elsif button_val = ALERT_BUTTON3 then
-- Exit without committing...
Exit_form(No_commit);
end if;
else
-- There have been no changes, just exit...
exit_form;
end if;
end;
本文介绍了一种在表单状态发生改变时,显示定制化警报的方法,通过使用KEY-EXIT触发器,确保用户在进行操作前得到及时反馈。

被折叠的 条评论
为什么被折叠?



