1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

how to validate a text it in oracle 10g form

Discussion in 'Oracle Forms and Reports' started by Muhammad Ashfaq, Nov 3, 2011.

  1. hi
    i am trying to validate text item in form. whene end user enter alphabets in numbered-text-item(e.g contact no.) and in that time it show alert "NUMBER ONLY MUST BE ENTER". For this what trigger and code would be required in plsql
  2. kiran.marla

    kiran.marla Forum Genius

    Likes Received:
    Trophy Points:
    Hi Muhammad,
    There are two steps for doing the task.
    1. Go to item properties, set data type = number .
    you see down one error and message appears, when you enter characters.
    see that number and write the code for that in ON-ERROR trigger.
    for sample code see the help topics of form builder.

    2. With PL/SQL, manually write the code in WHEN-VALIDATE-ITEM trigger
    by taking each character and compare with ASCII value of numbers.

    In this scenario you can enter leading zeros by taking data type = char .

    Good Luck....