لدي مشكلة
صممت فورم بحيث تاخذ معلومات العميل
بحيث اذا ادخل حروف بدل الارقام في المكان المخصص للرقم الشخصي فيجب ان يضهر مسج
message('Must contain Numbers');
واذا لم يدخل شيء في المكان المخصص للرقم الشخصي ف مسج الاتي سوف يضهر
message('Id must be entered');
ولكن المشكله هي ان المسج
message('Id must be entered');
يضهر في الحالتين عندما لم يدخل شي و عندما يدخل حرف بدل من رقم
فارجو المساعده و ماهو الحل
الكود:
declare
begin
:SYSTEM.MESSAGE_LEVEL :=5;
if :id is null or nvl(:id,0)=0
then
message('Id must be entered');
raise form_trigger_failure;
go_item('id');
else
if translate (:id,'*QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghj klzxcvbnm','*') is null
then
message('Must contain Numbers');
raise form_trigger_failure;
go_item('id');
elsif (nvl(length(:id),0)<>6 )
then
message('ID should contain 6 digit');
raise form_trigger_failure;
go_item('id');
end if;
end if;
go_item('name');


