Pre-Query trigger in Oracle D2k / Oracle Forms

Description
Fires during Execute Query or Count Query processing, just before Form Builder constructs and issues
the SELECT statement to identify rows that match the query criteria.
Definition Level form or block
Legal Commands
SELECT statements, unrestricted built-ins
Enter Query Mode no

See also: Define Custom Filter Using Pre-Query Trigger

Usage Notes
Use a Pre-Query trigger to modify the example record that determines which rows will be identified by
the query.
On Failure
The query is canceled. If the operator or the application had placed the form in Enter Query mode, the
form remains in Enter Query mode.
Fires In
COUNT_QUERY
EXECUTE_QUERY
Open the Query
Prepare the Query
See Process Flowcharts
Pre-Query trigger examples
Example
This example validates or modifies query criteria for a database block query.
BEGIN
/*
** Set the ORDER BY clause for the current block
** being queried, based on a radio group
** called ’Sort_Column’ in a control block named
** ’Switches’. The Radio Group has three buttons
** with character values giving the names of
** three different columns in the table this
** block is based on:
**
** SAL
** MGR,ENAME
** ENAME
*/
Set_Block_Property(’EMP’,ORDER_BY, :Switches.Sort_Column);
/*
** Make sure the user has given one of the two
** Columns which we have indexed in their search
** criteria, otherwise fail the query with a helpful
** message
*/
IF :Employee.Ename IS NULL AND :Employee.Mgr IS NULL THEN
Message(’Supply Employee Name and/or Manager Id ’||
’for Query.’);
RAISE Form_trigger_Failure;
END IF;
/*
** Change the default where clause to either show "Current
** Employees Only" or "Terminated Employees" based on the
** setting of a check box named ’Show_Term’ in a control
** block named ’Switches’.
*/
IF Check box_Checked(’Switches.Show_Term’) THEN
Set_Block_Property(’EMP’,DEFAULT_WHERE,’TERM_DATE IS NOT
NULL’);
ELSE
Set_Block_Property(’EMP’,DEFAULT_WHERE,’TERM_DATE IS NULL’);
END IF;
END;

Pre-Query trigger in Oracle D2k / Oracle Forms的更多相关文章

  1. Obtaining Query Count Without executing a Query in Oracle D2k

    Obtaining Query Count Without executing a Query in Oracle D2k Obtaining a count of records that will ...

  2. Using GET_APPLICATION_PROPERTY in Oracle D2k Forms

    Using GET_APPLICATION_PROPERTY in Oracle D2k Forms DescriptionReturns information about the current ...

  3. DISPLAY_ITEM built-in in Oracle D2k Forms

    DISPLAY_ITEM built-in in Oracle D2k Forms DescriptionMaintained for backward compatibility only. For ...

  4. Creating Timer in Oracle D2k / Forms 6i and Displaying a Clock

    Creating Timer in Oracle D2k / Forms 6i and Displaying a Clock This is about timer in D2k An externa ...

  5. Refresh / Updating a form screen in Oracle D2k Forms 6i

    Refresh / Updating a form screen in Oracle D2k Forms 6i ProblemYou want to show number of records pr ...

  6. CHECKBOX_CHECKED built-in in Oracle D2k Forms

    CHECKBOX_CHECKED built-in in Oracle D2k Forms DescriptionA call to the CHECKBOX_CHECKED function ret ...

  7. Creating List Item in Oracle D2k

    Special Tips for List Items in Oracle D2k In this section, I shall discuss some special tips and tec ...

  8. Creating Object Library OLB in Oracle D2k Form

    With following steps you can create Object Library (OLB) in Oracle D2k Forms.Step - 1Create a form i ...

  9. Using Call_Form in Oracle D2k

    Using Call_Form in Oracle D2k CALL_FORM examples/* Example 1:** Call a form in query-only mode.*/BEG ...

随机推荐

  1. PHP生成二维码【谷歌API+qrcode+圆角Logo】

    方法一:谷歌二维码API 接口地址:https://chart.googleapis.com/chart 官方文档:https://developers.google.com/chart/infogr ...

  2. less文件的样式无法生效的一个原因,通过WEB浏览器访问服务器less文件地址返回404错误

    有一种情况容易导致less文件的样式无法生效,就是部分服务器(以IIS居多)会对未知后缀的文件返回404,导致无法正常读取.less文件.解决方案是在服务器中为.less文件配置MIME值为text/ ...

  3. Objective-C语言控制语句

    • 分支语句• 循环语句• 跳转语句 Objective-C中的控制语句有以下几类:• 分支语句:if-else, switch• 循环语句:while, do-while, for• 与程序转移有关 ...

  4. 关于mac book 的启动选项

    苹果电脑是用EFI的,没有BIOS,唯一可以设置的是开机的启动选项.可以在基于 Intel 的 Mac 电脑上使用下列启动键组合启动时按住 C 键——从可启动 CD 或 DVD 光盘启动,如随机附带的 ...

  5. Erlang-特性

    一.模式匹配: 模式匹配作为Erlang的基础,用来完成很多不同的任务:可以用它从数据结构中提取字段值,在函数中进行流程控制,或者当你向一个进程发送消息时,从并行程序刷选那些需要处理的消息: 二.函数 ...

  6. 【jqGrid for ASP.NET MVC Documentation】.学习笔记.2.jqGrid Model-View-Controller 分离

    1 基本 分离代码 和 描述 ,在ASP.NET MVC 应用程序中是非常重要的.因此,jqGrid 的 mvc 模式使用一个共同的网格安装设置,包括 Model ,Controller 和 View ...

  7. std的find和reverse_iterator联合使用

    上代码: // test2013.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <stdlib.h> #in ...

  8. cat > 命令也可以创建文档

    今天看<Linux/Unix系统编程手册>,发现用cat > 命令也可以直接创建文本文档: cat > testcatcreate.txttesttest [2]+ Stopp ...

  9. 【转】MySQL5安装的图解(mysql-5.0.27-win32.zip)

    转载地址:http://blog.csdn.net/xssh913913/article/details/1713182 MySQL5安装的图解(最新版) http://hi.baidu.com/yu ...

  10. jsoup的基本写法

    jsoup这个工具用于抓取并解析网页,用起来也比较简单,语法上与Jquery类似,基本写法如下: File input = new File("/tmp/input.html"); ...