如果字段为空的Oracle表单为空,如何提出消息

发布于 2025-01-19 19:16:09 字数 263 浏览 4 评论 0原文

如果 Oracle 表单中的字段为空,如何提示消息我不确定它是否有效,并且我使用的触发器是 when-validate-item

begin
  if date = NULL then
    message('please enter issue date')
  else
    null;
  end if;
end;

How to prompt a message if field is empty in oracle forms i'm not sure if it works and the trigger i'm using is when-validate-item

begin
  if date = NULL then
    message('please enter issue date')
  else
    null;
  end if;
end;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧伤慢歌 2025-01-26 19:16:09

从我的角度来看:

  • 您应该编辑字段的属性并将required属性设置为yes并让表单处理它

  • 如果您坚持重新发明轮子,那么就不要只是显示一条消息,因为它几乎没有用 - 用户可以忽略它。相反,引发错误

    如果 :block_name.item_name 为 null 那么
        message('请输入发布日期');
        raise_form_trigger_failure;
    结束如果;
    

    将该段代码放入 WHEN-VALIDATE-ITEM 触发器中。

From my point of view:

  • you should edit field's properties and set the required property to yes and let Forms worry about it

  • if you insist on reinventing the wheel, then don't just display a message as it is pretty much useless - user can ignore it. Raise an error, instead

    if :block_name.item_name is null then
        message('Please, enter issue date');
        raise_form_trigger_failure;
    end if;
    

    Put that piece of code into the WHEN-VALIDATE-ITEM trigger.

一曲爱恨情仇 2025-01-26 19:16:09

只需将代码稍微修改为

  • 转换date = null :日期为null ,因为:已准备好
    代码中的字段名称

  • 添加一个额外的消息('');完全带有空白填充
    参数
    )如果需要一个弹出消息框

  • 不要忘记当前行末端的半隆
    消息(....)

中调用时,validate-item new-- Item-Insance 触发

Just modify the code a little bit as

  • converting date = NULL to :date IS NULL, since : prepended to
    the field's name within the code

  • add an extra message(''); (exactly this with blank padded
    argument
    ) if a pop-up message box needed

  • don't forget the semicolon at the end of the line of the current
    message(....)

as invoking from one of the WHEN-VALIDATE-ITEM or WHEN-NEW-ITEM-INSTANCE triggers

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文