Oracle apex 我想要Apex应用程序中相同购买条目的错误消息

Oracle apex 我想要Apex应用程序中相同购买条目的错误消息,oracle-apex,Oracle Apex,我正在使用oracle 11gApex,因为我已经为购买创建了一个报告。它包含我们想要输入书籍购买详细信息的购买条目,第二次如果我输入相同的书籍,它会给出类似“您是说此购买已经输入”的错误信息 为了检查现金备忘录编号和账簿名称,我在报告中使用了以下验证,但其工作不正常 我使用的书籍作为物品名称,现金备忘录编号与账单类似 declare cnt_sameitem number; cnt number; begin select count(a.item_name),coun

我正在使用oracle 11gApex,因为我已经为购买创建了一个报告。它包含我们想要输入书籍购买详细信息的购买条目,第二次如果我输入相同的书籍,它会给出类似“您是说此购买已经输入”的错误信息

为了检查现金备忘录编号和账簿名称,我在报告中使用了以下验证,但其工作不正常

我使用的书籍作为物品名称,现金备忘录编号与账单类似

declare
    cnt_sameitem number;
    cnt number;
begin
    select count(a.item_name),count(p.cash_memo_no) into cnt_sameitem,cnt     
    from T_TEMP_LINE_ITEM_P_ACT a,T_TOTAL_PURCHASES p 
    where a.purchase_id=:P55_PURCHASE_ID and 
          CODE=:P55_ITEM_CODE and a.ITEM_NAME=:P55_ITEM_NAME and             
          a.SELLING_PRICE=:P55_SELLING_PRICE;
    if (cnt_sameitem >=1) and (cnt >= 1)  then
        return false;
    else
        return true;
    end if;
end;

打开验证进行编辑并输入文本。您的意思是此购买已输入到字段错误消息中。此外,您还可以选择“显示错误消息的位置”字段“错误消息显示位置”-它可以显示在单独的错误页面上,也可以显示在定义为页面模板一部分的通知区域中,或者显示在字段标签内

declare
    cnt_sameitem number;
    cnt number;
begin
    select count(a.item_name),count(p.cash_memo_no) into cnt_sameitem,cnt     
    from T_TEMP_LINE_ITEM_P_ACT a,T_TOTAL_PURCHASES p 
    where a.purchase_id=:P55_PURCHASE_ID and 
          CODE=:P55_ITEM_CODE and a.ITEM_NAME=:P55_ITEM_NAME and             
          a.SELLING_PRICE=:P55_SELLING_PRICE;
    if (cnt_sameitem >=1) and (cnt >= 1)  then
        return false;
    else
        return true;
    end if;
end;