oracle表单字段验证

时间:2018-02-15 17:51:24

标签: oracle oracleforms

屏幕截图

           CREATE TABLE TAB_COL1
            (
              PROFS_ID           NUMBER(38) ,
              DSP_PROFILE2       VARCHAR2(12 BYTE),
              DSP_PROFILE_TYPE2  VARCHAR2(10 BYTE),
              DSP_DESCRIPTION2   VARCHAR2(60 BYTE),
              DSP_ACTIVE4        VARCHAR2(1 BYTE)
            );

            SET DEFINE OFF;
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (986, 'A', 'GRP', 'Exechon', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (987, 'A1', 'GRP', 'JT9 Costed Inventory', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (988, 'A2', 'GRP', 'JT8 Costed Inventory', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (989, 'A3', 'GRP', 'GE Costed Inventory', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (990, 'A4', 'GRP', 'A4', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (991, 'A5', 'GRP', 'CF34', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (992, 'A6', 'GRP', 'ESL Costed Inventory', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (993, 'A7', 'GRP', 'ESL Costed Inventory', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (994, 'A8', 'GRP', 'A8', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (995, 'A9', 'GRP', 'A9', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (996, 'AA', 'GRP', 'AA', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (997, 'AB', 'GRP', 'Airbus', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (998, 'AC', 'GRP', 'AC', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (999, 'AD', 'GRP', 'MTU Consignment', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1709, 'AE', 'GRP', 'AE', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1000, 'AF', 'GRP', 'AF', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1710, 'AG', 'GRP', 'AG', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1001, 'AH', 'GRP', 'Hamilton Sundstrand / Traditional  - AH', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1002, 'AI', 'GRP', 'AI', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1711, 'AJ', 'GRP', 'SASOF II CFM56', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1003, 'AK', 'GRP', 'AK', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1004, 'AL', 'GRP', 'AL', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1005, 'AM', 'GRP', 'AM', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (5282, 'AN', 'GRP', 'AN', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (5437, 'AO', 'GRP', 'AO', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1006, 'AP', 'GRP', 'Apollo Consignment - CFM', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1712, 'AQ', 'GRP', 'AQ', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1007, 'AR', 'GRP', 'ATR (ACLAS)', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1008, 'AS', 'GRP', 'AS', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1009, 'AT', 'GRP', 'Aerothrust Stator Exchange Program', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1010, 'AU', 'GRP', 'AU', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1011, 'AV', 'GRP', 'Avio SPA JT8 Consignment', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (5603, 'AW', 'GRP', 'AW', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (1012, 'AX', 'GRP', 'AX', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (5723, 'AY', 'GRP', 'JT8-200 SERIES COSTED', 'Y');
            Insert into TAB_COL1
               (PROFS_ID, DSP_PROFILE2, DSP_PROFILE_TYPE2, DSP_DESCRIPTION2, DSP_ACTIVE4)
             Values
               (5095, 'AZ', 'GRP', 'AZ', 'Y');
            COMMIT;

创建了一个样本表。

还会发送屏幕截图表单的外观。如果用户选择配置文件类型为“组代码”,则使用lov按钮选择值,例如“AB”并保存,当我查询记录时,该值将填充。但是,如果用户将值键入为“AB”并保存,则会保存,但在查询后,该值不存在。

[截屏2 screen shot 3

2 个答案:

答案 0 :(得分:1)

我认为你的LOV有多个返回项,其中一个返回value字段的值。我假设您为每个value列都有唯一值。

Record Groups select value, division, description into :value, :division, :description from sales中,您的LOV查询可能是select division, description into :division, :description from sales where value = :value,请考虑POST-TEXT-ITEM,其中值=' AB'对于您的情况,WHEN-VALIDATE-ITEMvalue字段的{ "name": "ce", "contactsId": [1, 3] } 触发器。

答案 1 :(得分:0)

将相同的代码(在POST-QUERY触发器中使用)放到该项目的WHEN-VALIDATE-ITEM触发器上(个人资料类型?我不确定,不太明白什么你已经说过了。