Text Item Validation in Oracle Forms 6i

Dear All Seniors
Please guide that how to do validation on text fileds in oracle FORMS 6i.
I have form like that
table name= emp
columns:
Code, Name
Code is auto generationg and Name field manually data typed.
now if
code, Name
1 Asim
2 Asim // it should not take .
please help.

Hi,
You mean it should not take dupliate names or it should not take "//"
If you have a set of character that should not be there for this field try using instr function. You can check if the field contains any character you don't want to be included in the name field.
If instr(:name,'A') > 0 then
message('xxxxxxx');
Regards
Yoonas

Similar Messages

  • Regarding validation in oracle forms

    I have a requirement that in oracle forms i need to validate that i enter the data in one record and the same data in next record also with the checkbox checked for both rows . And when i enter the same data in next record i.e 3rd record it should not allow to checkbox for 3rd record.This should be the frond end validation in oracle forms .
    My requirment looks like this
    A B C --> columns in oracle forms
    1 ab ab --> checkbox checked
    1 ab ab --> checkbox checked
    1 ab ab ---> when i check the checkbox it should not allow as only any of the two rows only should be checked
    Please help me out?
    Regards
    Prasad

    hello
    Change/ modify the properties of the check box item;
    for the check boxes :
    1. Make the data type of the check box as number;
    2. fill the functional a.)value when check = 1 b.) value when uncheck = 0;
    3. add new item to summarize the value of the checkbox;
    change properties of the new added item
    datatype number;
    calculation summary
    summary function :- sum
    summarize block :- your block
    summarize item :- your check box item.
    used :----> when checkbox change trigger
    if nvl(:item_summry,0 > 2 and //double entry of data then
    your code......
    .... message..
    raise..
    else
    your code.....
    end if;
    For Duplicate Item data entry :-
    see this for the duplicate entry for item :-
    duplicate records in  a multi record block
    modify my given code & modify the said link information to satisfied your requirement.
    charles

  • Item Validation on a Form - Receives ORA-0094: Invalid Idenitier error

    I'm fairly new to APEX and having an issue with an Item Validation on a Form receiving the ORA-0094: <Column Name>: Invalid Identifier error. I have looked at postings in this form on this error and tried many of the suggestions. I still can not get it to work. My lack of experience with APEX is not helping either.
    I'm using APEX release 2.2 with IE6.
    I'm trying to create a new Invoice in the Invoice table (CTS_INVOICE). The RFA Number for this invoice must be an active RFA record in the RFA table (CTS_RFA). Before I add the check for the RFA active status, I wanted to get the code that checks for the existence of the RFA record working first.
    After filling in the fields on the forms, click the Create button, and receives an error page with the following error ORA-0094: "RFA_NUMBER": Invalid Identifier.
    I have checked to make sure the table name, column name, and item name were correct with spelling and capitalization.
    Used the Wizard to setup the Item Validation.
    Type: EXISTS
    Validation Expression 1: Select 1 from CTS_RFA where RFA_Number = :P25_RFA_NUMBER
    Error message: Enter an active RFA number.
    location: Inline with Field and in Notification
    Associated Item: P25_RFA_NUMBER
    Any help would be greatly appreciated.
    Thanks,
    Vivian

    Vivian - Might the column have been created as a quoted identifier with mixed upper/lower case characters?
    Run this in SQL*Plus:
    select count(rfa_number) from cts_rfa;
    If that works without error then this is not the problem.
    Scott

  • How do i disble edit menu's delete item on the oracle forms 11i

    How do i disble edit menu's delete item on the oracle forms 11i
    i have an oracle form that i created using standard template, i am able to disable the edit.clear button but cannot disable the edit.delete button.
    Pelase help.

    Hi user6010265
    Welcome here :)
    but unfortunatly u mis-choose the right forum pls follow the following link they might be more helpful than us..
    Transfer alert in 11i
    Regards,
    Abdetu...

  • Text item validation into Formular.

    hi.
    From some days I have written my fiirst application using Oracle Forms6i.
    In oracle9i I created table USER with column id_user number(5), username varchar2(10) and passwd varchar2(12).
    In oracle forms builder I created the formular with 4 controls(2 fields - username and passwd ,one button to login user and Text item to the botton of this formular to print message for user). In ProperPalette for Text item 'username' and 'passwd' I set adequately Maximum Lenght peperty to 10 and 12(for 'passwd' field) and Required to Yes.
    Then I wanted to make a validation username and passwd fields in this way, that the user can put in 'username' field the string with length between 8 to 10 and for 'passwd' between 8 to 12 and checking all other cases incorrect data entering by login user.
    I created trigger WHEN-MOUSE-CLICK for button with this body:
    declare
         dlug_username number;
         dlug_passwd number;
    begin
         dlug_username := length(:user_data_log.username);
         dlug_passwd := length(:user_data_log.passwd);
         if (:user_data_log.username = NULL and :user_data_log.passwd = NULL) then
              :user_data_log.komunikaty_logowania := 'you didn enter any data!';
         elsif dlug_username >= 8 and dlug_passwd >= 8 then
         :user_data_log.komunikaty_logowania := 'Correct data!';
         elsif dlug_username < 8 or dlug_passwd < 8 then
                   :user_data_log.komunikaty_logowania := 'Fields USERNAME i PASSWD must have more then 8 sign. Correct them!';
                   :user_data_log.username := '';
                   :user_data_log.passwd := '';
         end if;
    exception
         when VALUE_ERROR then
         :user_data_log.komunikaty_logowania := dlug_username;
    end;
    When I run this form by Run Form client/server button, it's not matter what I'll enter in two field 'username', 'passwd', when I press button always is invoke exception section
    but no if condition.
    Now, I don't know what do with this. What is the best way to resolve problems with validation of form elements?
    Thanks in advance for all help, some hints, tutorials. I appologise for so long post, but I
    want directly describe my problem. Thanks.

    Hi,
    Regarding to your post and your problem , obviously the code doesn't go into the
    IF condition and validate it becouse the syntax is not appropriate and every time it goes to the IF it jumps into the exception part. Thats why you have to correct your code as fllowing.
    if (:user_data_log.username IS NULL) and (:user_data_log.passwd IS NULL) then
    etc till the end of the code.
    Kindly if this approach meet your requirment of solving , update your problem with a Subject of Solved
    Regards
    Omar

  • How are listbox and radiobutton items working in oracle forms?!?

    Hi all.
    I need some help over may be a standard case in every real project.
    Imagine i have a db table PERSONS -> PERSONID, NAME, TOWNID, MATRIALSTATUSID
    and table TOWNS -> TOWNID, TOWNNAME
    and table MATRIALSTATUS -> MATRIALSTATUSID, NAME
    And i have a standard oracle form with text item person name, listbox item with many towns (from TOWNS table) and the town of the concrete person is selected when the form is inited, after that we can change it by selecting other town and saving it to db.
    The same is with matrial status but lets make it as radio group with 3 buttons married, not merried, divorced.
    So my questions is how to populate the listbox(radiogroup) for 1 person by selecting data from other preferenced tables. And most important how this data is populated in the list box for example i.e. every town name is indexed in some way or what. I am a java developer and for example in java the control listbox item has two attributes the name(string) that is displayed in the listbox and a index binded for that name, and i work with indexes and show strings. I read about LOV but couldn't understand how to "index" the populated values. Is it possible.
    And please can you give me some example of how to load (populate + set current town), change and (if it is possible) "index". The same case appears to be valid with radio buttons and check boxes.
    You could give me some tutorials too, i cant find simple and focused on the problem examples.
    Thank you.
    Best Regards.

    Hi,
    well here is what i done for now.
    First I created recordGroup with query SELECT GENDER, GENDERID FROM GENDERS (I want to select all genders and place them in listbox)
    After that i created Listbox and on triger when-new-form i placed this code:
    DECLARE
    it ITEM:=FIND_ITEM('PERSONS_DETAILS.GENDER');
    BEGIN
    CLEAR_LIST(it);
    POPULATE_LIST(it, 'RG_LIST');
    DEFAULT_VALUE(NULL, 'GLOBAL.PERSONID');
    IF :GLOBAL.PERSONID IS NOT NULL THEN
    SET_BLOCK_PROPERTY('PERSONS_DETAILS', ONETIME_WHERE, 'PERSONID=' || :GLOBAL.PERSONID);
    GO_BLOCK('PERSONS_DETAILS');
    EXECUTE_QUERY;
    :GLOBAL.PERSONID:=NULL;
    END IF;
    END;
    Imagine i have a main form PERSONS that displays general information about many persons (the data is retrieved from PERSONS db table). The form PERSONS displays PERSONID, PERSON FIRSTNAME and PERSON LASTNAME. When a user double click on some row from the PERSONS FORM( i have tabular datablock that displays the person data) other form 'PERSONS_DETAILS' must be displayed with detailed information about the selected person. The data about the selected person is loaded well but i want gender to be listbox and the user can change it if he wants. So i have TABLE GENDERS 1:N with PERSONS and the table has GENDERID AND GENDER. When the user double clicks on single person i must populate the list with all possible genders from the GENDERS table and set the gender of the selected person. How to do that?
    P.S.: The example with gender is not very good because it could be only male female, but don't worry about it. You may think about gender list as townlist :)
    It finds me the GENDER LIST and populates it. After that i take the personId (that is global variable and comes from previous form) and displays all the data for the person with id personid.
    When i compile the form it gives me :
    FRM-30351: No list elements defined for list item.
    List GENDER
    Edited by: user9536806 on Nov 19, 2008 3:01 AM

  • Validations in Oracle Forms 6i

    Hi,
    Can anybody please let me know how do we use phone and email validators in Oracle Forms 6i for textitem.
    and what is the format for phone and email and how do we create.

    hi
    you can validate the format of an email in the WHEN-VALIDATE-ITEM trigger
    by using a function stored in the db that checks if the format of the email is correct
    for example :
    FUNCTION is_valid_email(i_email IN VARCHAR2) RETURN BOOLEAN
    IS
    v_dummy NUMBER := 0;
    BEGIN
    SELECT 1 INTO v_dummy
    FROM dual
    WHERE regexp_like(i_email,'^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$');
    RETURN TRUE;
    EXCEPTION
    WHEN no_data_found THEN
    RETURN FALSE;
    WHEN others THEN
    RETURN FALSE;
    END is_valid_email;
    you can also use regexp for the validation of a tel number
    I hope that helps you.
    Frane

  • List item problem in oracle forms 6i

    Hello,
    I've 10 test filed, in-front of each text field there are 10 list item (separate list item)
    for each list item element list is given below
    Route
    Customer name
    Delivery date
    Delivery Time
    Delivery Session
    Expected received
    Actual Received
    Fresh Received
    Rate per liter
    Debit Amount
    On text fields I am fetching records from another file. User will map the list item with text item.
    What i want to check is, list item should not get repeated. i.e suppose I've run time display like this
    text item
    list item
    A
    ROUTE
    B
    DELIVERY DATE
    C
    DELIVERY TIME
    D
    DELIVERY DATE
    E
    EXPECTED RECEIVED
    F
    ACTUAL RECEIVED
    G
    FRESH RECEIVED
    H
    RATE PER LITER
    I
    DEBIT AMOUNT
    J
    DELIVERY SESSION
    on text filed B- DELIVERY DATE is assign and at text field D again DELIVERY DATE is assign. I want to avoid this thing and prompt the user regarding the same. How should I go about this? Should I design a button for validation, if yes then what should be the code? or should i go with WHEN-LIST-CHANGE? if so, then what should be the code?
    my design time display is like this
    text
    list item
    txt1
    lst1
    txt2
    lst2
    txt3
    lst3
    txt4
    lst4
    txt5
    lst5
    txt6
    lst6
    txt7
    lst7
    txt8
    lst8
    txt9
    lst9
    txt10
    lst10
    please suggest something
    Thank You
    Sam

    THe most user-friendly way would be to remove elements from all other lists when they are chosen once. You would have to have a WHEN-LIST-CHANGED-trigger on all listitem and populate the the listitems accordingly.

  • List Item problem in oracle forms

    Hi,
    I am using list item in oracle forms 6i and facing one problem. I am populating list using following built-in.
    Clear_list()
    Create_Group_From_Query( )
    Populate_list()
    The problem I am facing is when list gets populate it keep the cursor at last element of list with null value. I want cursor to go at first item in the list. Is this thing is possible. The list item I am using is pop-list. In combo its showing list perfectly but I have to use pop-list only. Please help to come out of this problem.
    Thanks in advance
    Shweta.

    Hi Shweta,
    Please post your query in Oracle Forms discussion forum.
    Thanks,
    Wilson.

  • List items problems in oracle forms 6i

    Hello friends,
    I am using list item in oracle forms 6i and facing one problem. I am populating list using following built-in.
    Clear_list()
    Create_Group_From_Query( )
    Populate_list()
    The problem I am facing is when list gets populate it keep the cursor at last element of list with null value. I want cursor to go at first item in the list. Is this thing is possible. The list item I am using is pop-list. In combo its showing list perfectly but I have to use pop-list only. Please help to come out of this problem.
    Thanks in advance
    Shweta.

    I have a question related to this post...what if you want the first item on the list to be the null record - but have it at the top of the list - like all other drop downs I've seen? I'm running on forms 9i
    Edited by: saburo on Mar 2, 2010 7:58 AM

  • On text change trigger in oracle forms 9

    I want to simulate on-text-change trigger similar to the one present in java and other programming languages.
    I need this trigger to be invoked when ever we change some text in the textfield.
    Is there any way to do this?
    I used two text fields to compare the last entered and newly typed based on a timer interval of 3secs
    But my problem is Oracle trims the spaces present in the textfield and also highlights the text present in textfield when ever I enter a space....
    Scenario : I want to use this trigger and refresh the search results based on the text present in the textfield.
    Thanks in advance

    To do the kind of thing you are talking about you will need to implment a Java Bean in your form listen for the changes. Take a look at KeyEvent Java Bean or the Oracle Forms PJCs-Java Beans web site for more information and examples.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Is LOV able to do real validation like Oracle Forms LOV?

    Dear JHeadstart Team,
    I am using JDeveloper 10.1.3.3 and JHeadstart 10.1.3.2.52.
    To simplify the situation, I explain the problem using scott schema.
    I created a page on the emp table and used a LOV on the deptno and check the lov for validation for the lov. I changed the query of DeptLookupView (which lov uses) and added a where deptno <= 30 to that, so lov just showed the department with deptno <= 30.
    Then, When I entered number 40 in the deptno field and pressed tab, the lov poped up with No rows found in that.I pressed the cancel button and the amount of deptno remained 40. I pressed Save and data successfully commited to database.
    It seems to me a little strange. This capability exists in the Oracle form and when we use lov for validation in the Oracle form it does not permit us to enter a value which does not exist in the lov. I expected to see that functionality here too. Am I wrong or Is it a bug in JHeadstart?
    If it is not a bug and this functionality is not supported in the JHeadstart, is there any way to achieve this functionality.
    Any help would be highly appreciated.
    Thanks in advance,
    Navid

    Navid,
    It is not a bug in JHeadstart, it is intended behavior of ADF Faces. The ADF Faces valueChangesListener that we use to validate and display the LOV window only fires when the user-entered value changed, since the last time the listener fired. When you cancel the LOV and click the Save button the listener no longer fires.
    Note however that you are implementing a business rule (deptno must be <- 30) in the view layer only, which is a bad practice. I suggest that you implement the same rule in Business Components and/or in the database.
    This way, the user will get an error message when he tries to save a value > 30.
    Steven Davelaar,
    JHeadstart Team.

  • Decimal Point Validation in Oracle Forms 6i

    One of my table has a column named interest. Data type of this column is number (4,1) so it can hold 99.9 and 100 both.
    If user enters 9.99, oracle form accepts the values and rounds it to 10. When scale defined for this data type is 1 so user shouldn’t be allowed entering 2 digits after decimal.
    I would like oracle to give error stating that user can enter upto 1 decimal place only so 9.99 is invalid input. Is there any function in oracle form (D2k)that let you know how many digits user has entered after decimal?
    Is there any function in oracle form (D2k) that let you know the length of input ?

    Hi
    Why don't u use Format mask property for the same,so it will not allow user for wrong i/p
    alternatively use forms message to display pop-up .
    Rgds
    NP

  • Issue for Amount From_amt and to_amt  Overlapping validation On oracle Form

    Hi Expert's
    i need Help on Oracle Form side .
    PROBLEM :-
    i want to put Overlapping check On Fr_amt - To_amt in Oracle Tabular form in Modify MODE after execute query.
    for example : If suppose User key in 1st line Amout range is 10 -100 ,the after 1st line if user key in second line like amount range is 50 -80 or 10-50 then i want to ristrict them and popup the message :- Sales Amount should not Overlap ...
    --Here is my  code  which works only current record
    declare
    fr_amt number(10);
    l_curr number;
    begin
    fr_amt := :blk_name.from_amt;
    l_curr := :system.cursor_record;
    first_record;
    loop
    exit when :system.last_record ='true'
    if :system.cursor_record <> l_curr then
    if fr_amt between :blk_name.from_amt and :bl_name.to_amount then
    message('Sales amount should not be overlap');
    raise form_trigger_failuier;
    go_reccord(l_curr);
    go_item('blk_name.from_amt');
    end if;
    next record;
    end if
    end loop;
    go_record(l_curr);
    first_record;
    end;
    Note : Can anybody correct my code if you come across same problem.
    Thanks
    Abhishek

    Hi Dora ,
    Note : My form is in modify mode and execute query ,mean to every time after open form record always on screen
    so i want to check overlap value in form level only ..
    can u please check my code which i wrote same like you but its not working :
    PROCEDURE TEST IS
    m_loop1_rec number:=1;
    m_loop2_rec number;
    m_exit number :=0;
    m_last_Rec number :=0;
    m_loop_rec NUMBER :=0;
    m_from_amt NUMBER;
    m_to_Amt NUMBER;
    Begin
    go_block('CG$CTRL01');
    last_record;
    m_last_rec := :system.cursor_Record;
    first_record;
    Loop
    go_record(m_loop1_rec);
    m_from_amt := :CG$CTRL01.FR_SLS_AMT ;
    m_to_Amt := :CG$CTRL01.TO_SLS_AMT ;
    m_loop2_rec := m_loop1_rec+1;
    Loop
    go_record(m_loop2_rec);
    If (m_from_Amt between :CG$CTRL01.FR_SLS_AMT and :CG$CTRL01.TO_SLS_AMT) or (m_to_Amt between :CG$CTRL01.FR_SLS_AMT and :CG$CTRL01.TO_SLS_AMT ) then
    m_exit := m_loop2_rec;
    end if;
    exit when m_exit > 0;-- or m_loop_rec >= m_last_Rec;
    m_loop2_rec := m_loop2_rec +1;
    End loop;
    exit when m_exit > 0 or m_loop1_rec = m_last_Rec -1;
    m_loop1_Rec := m_loop1_rec + 1;
    end loop;
    If m_exit > 0 then
    go_record(m_exit);
    message(' This range overlaps with previously entered ranges');
    RAISE form_trigger_failure;
    end if;
    --END IF;
    END ;
    Thanks
    Abhishek

  • How to print sequence number for a text item in a oracle reports

    Hi
    I have text item which repets for every round,if i have 3 or 4 rounds i should number the text item as 1,2,3,4 etc.... in a report.
    Can anybody help me
    Thanks in advance

    Hi Bob
    Thank you for your reply.
    Here is the data for example:
    Jobxxxx
    Round
    assembly for 3d $200 1 $200.00
    proof for 3d $10 3 $30.00
    Round
    plate for 3d $200 1 $200.00
    image for 3d $10 3 $30.00
    Job yyyy
    Round
    assembly for 3d $100 1 $100.00
    proof for 3d $50 3 $150.00
    So Bob everything is comming from tables except round.
    My question is how to add sequence number to round adn the result should be like this:
    Jobxxxx
    Round 1
    assembly for 3d $200 1 $200.00
    proof for 3d $10 3 $30.00
    Round 2
    plate for 3d $200 1 $200.00
    image for 3d $10 3 $30.00
    Job yyyy
    Round 1
    assembly for 3d $100 1 $100.00
    proof for 3d $50 3 $150.00
    Thank you in advance

Maybe you are looking for

  • Help with triggers

    Hi All, i have a few triggers that I need your help with. The first trigger (below) is fired when an update is made to a column in an invoices table. The question I have is to do with the exception section. I want to change the status of the invoice

  • Versamail error and Gmail access Issue

    I have been using my e-mail button on the front of the Palm Centro to access the gmail account I set up. I opened a new gmail account and wish to use that. I edited the gmail account information on my phone through Accounts. However, everytime I try

  • Radio stops after a minute of play

    I usually listen to espn radio when I do my work, but the last couple of days it will just stop playback after about a minute or so, it has nothing to do with my connection because it is not refreshing and if I hit play it will start back up again, a

  • Delete Stored Messages

    How do you go in and delete stored messages to free up space in the phone. when you go in and see you have under settings, usage, manage storage, messages it shows a number in either mb or gb. How do you delete the sored massages saved? To gain more

  • Where is link to Drupal DPS Bridge?

    Hi: There is a page describing the Drupal DPS Bridge at Introduction to Drupal DPS Bridge but there is no link to download the Drupal DPS Bridge module. There are even videos there demonstrating the use of the Drupal DPS Bridge. Where can I download