执行过程如果文本字段未空,则通过JavaScript提醒消息字段不能为空

发布于 2025-02-08 16:24:18 字数 1354 浏览 1 评论 0原文

我一直在努力寻找一种进行此验证的方法,并执行我的pl/sql过程。

必需:

  • 需要检查字段是否为空,并且通过javaScript字段提醒是空的,我的动态操作不应执行。

  • 如果我的文本字段不为空,则只能运行我的动态操作PL/SQL过程

我的形式如下:

Subject : `TextField`  -> P1_SUBJECT
Message : `TextField`  -> P1_MESSAGE
Submit  : `Button`     -> property set to -> Execute Validation -> ON

我面临的问题:

我已经为主题,消息 - &gt设置了属性。需要:

然后在提交按钮 - &gt上创建动态操作。选定选项 - > 执行服务器端代码

pl/sql代码 - >中 写下我的pl/sql代码,以立即发送邮件

,而无需输入主题,消息 - > 如果我单击我的提交按钮 - >然后,我的过程也将执行并发送邮件。我不希望它发生。除非我的主题消息字段不是空的,我的过程不应触发。

代码:

begin
  apex_mail.send(
    p_to   => '[email protected]',
    p_from => '[email protected]',
    p_body => :P1_MESSAGE || utl_tcp.crlf,
    p_subj => :P1_SUBJECT);
    
  commit;
end;

任何解决方案都非常感谢!!!

I have been struggling to find a method to do this validation and execute my PL/SQL procedure.

Required :

  • Need to check field is empty or not and alert via javascript field is empty and my Dynamic action should not be executing.

  • If my text field is not empty then only my Dynamic action PL/SQL procedure should be running.

My form as below fields :

Subject : `TextField`  -> P1_SUBJECT
Message : `TextField`  -> P1_MESSAGE
Submit  : `Button`     -> property set to -> Execute Validation -> ON

Problem I am facing :

I have set the property for Subject , Message --> Value required : ON

Then created dynamic action on Submit button -> selected option -> Execute server-side code

In PL/SQL code -> written my PL/SQL code to send mail

Now without entering values to Subject , Message -> If I click my Submit button -> Then also my procedure gets executed and mail is sent. This I don't want it to happen .. unless my Subject and Message field is not empty my procedure should not be triggering.

Code :

begin
  apex_mail.send(
    p_to   => '[email protected]',
    p_from => '[email protected]',
    p_body => :P1_MESSAGE || utl_tcp.crlf,
    p_subj => :P1_SUBJECT);
    
  commit;
end;

Any solution is much appreciated !!!

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

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

发布评论

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

评论(1

兔小萌 2025-02-15 16:24:18

请允许我提出另一个解决方案:

而不是在提交上使用动态操作,而是创建一个页面流程,该过程在提交时使用相同的PL/SQL代码发射。如果需要该值,则验证将失败,并且页面进程将不会触发。

Allow me to suggest another solution:

Instead of using a dynamic action on submit, create a page process that fires on submit with that same pl/sql code. If the value is required then validation will fail and the page process will not fire.

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