执行过程如果文本字段未空,则通过JavaScript提醒消息字段不能为空
我一直在努力寻找一种进行此验证的方法,并执行我的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 myDynamic 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请允许我提出另一个解决方案:
而不是在提交上使用动态操作,而是创建一个页面流程,该过程在提交时使用相同的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.