Triger for display next record in oracle forms

hai all,
i want to do
when new form opened i have to add new reord that is empty new form also my new rownum will be displayed.
now i getting first record.
like:
GROUP_ROWNUM:     1
GROUP_ID:      120130
GROUP_NAME aaaaaaaaa
need like:
GROUP_ROWNUM:     7
GROUP_ID:
GROUP_NAME
that can be done by
trigger for display next record in oracle forms?
or through property seting?
thanks in adv,
rcs
--------

YES, this block is base on the DB table
through defualt navigational button i can go to next,last,new record
but i want create seperate form for new entry, in that i want to display
old rownum
formula to get rownum automatically (i am not at all typing it is system generated)
even though i created column group_rownum for rownum
(i can't be typing)
LAST_RECORD;
NEXT_RECORD; also not getting the next rownum
i hope now understand me
any posible way?
thank you for your good input
i.e.
SQL> DESC GROUP_MSTR1;
Name Null? Type
GROUP_ID NOT NULL NUMBER(10)
GROUP_NAME NOT NULL VARCHAR2(30)
SQL> select * from GROUP_MSTR1;
GROUP_ID GROUP_NAME
123 AAAAAA
124 BBBBBBBB
125 CCCCCCCCC
126 DDDDDDDD
1 eeeeeeee
2 FFFFFFFFF
3 ggggggg
7 rows selected.
SQL> select rownum, GROUP_ID, GROUP_NAME from GROUP_MSTR1;
ROWNUM GROUP_ID GROUP_NAME
1 123 AAAAAA
2 124 BBBBBBBB
3 125 CCCCCCCCC
4 126 DDDDDDDD
5 1 eeeeeeee
6 2 FFFFFFFFF
7 3 ggggggg
7 rows selected.
-------------

Similar Messages

  • Problem with inserting new records in Oracle Forms

    Hi Friends,
    I am a new user to Oracle Forms and I need a help from you people. The problem is as follows:
    I have a data block in which I can display a number of records. In this data block the user will be able to edit the fields if no child records are found in another table. I have used when-new-record-instance to attain this scenario. All are text items. One item licensee_id which is made invisible by setting the property in property palette and required=no ( as this is the primary key of the table). Also the audit columns are made invisible.
    The code for it is as follows:
    DECLARE
         v_alert_button NUMBER;
         v_cnt                          NUMBER;
    BEGIN
         SELECT COUNT (*)
    INTO v_cnt
    FROM id_rev_contracts
    WHERE licensee_id = :ID_REV_LICENSEES.licensee_id;
    IF v_cnt > 0 THEN
    set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_FALSE);
    ELSE
         set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_TRUE);
         -- set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', INSERT_ALLOWED, PROPERTY_TRUE);
    END IF;
    END;
    Now in this data block I should also be able to insert new records and for the same I have used PRE-INSERT trigger and the code for it is as follows:
    DECLARE
         v_alert_button NUMBER;
    CURSOR v_licensee_id IS SELECT id_rev_licensees_s.NEXTVAL FROM dual;
    BEGIN
    OPEN v_licensee_id;
    FETCH v_licensee_id INTO :id_rev_licensees.licensee_id;
    CLOSE v_licensee_id;
    IF :id_rev_licensees.licensee_id IS NULL THEN
    Message('Error Generating Next v_licensee_id');
    RAISE Form_Trigger_Failure;
    END IF;
    :ID_REV_LICENSEES.created_by := :GLOBAL.g_login_name;
    :ID_REV_LICENSEES.last_updated_by := :GLOBAL.g_login_name;
    :ID_REV_LICENSEES.create_date := SYSDATE;
    :ID_REV_LICENSEES.last_update_date := SYSDATE;
    EXCEPTION
    WHEN form_trigger_failure
    THEN
    RAISE form_trigger_failure;
    WHEN OTHERS
    THEN
    v_alert_button :=
    msgbox ('ERROR in Pre-Insert - ' || SQLERRM, 'STOP', 'Contact IST');
    RAISE form_trigger_failure;
    END;
    Every thing is compiling fine but at the run time when I am trying to insert a new record I am receiving the following error:
    FRM-40508:ORACLE error:unable to insert record
    I also think the pre-insert record is not firing at the time of inserting a new record and saving it. So I request you to please delve into this problem and suggest me how to overcome this problem. Code snippets would do more help for me. If you need any other things from me please let me know. I will see if I could be of any help in that concern because I may not be able to send the entire form as it is.
    Thanks and regards,
    Vamsi K Gummadi.

    first of all
    pre-insert fires after the implicit/explicit commit/commit_form is issued and before the real insert is submitted to the db.
    i would suggest to remove the error handling part for the moment
    because i believe you might be getting "ora-xxxx cannot insert null"
    and also make visible the primary column to check if the pre-insert is executed.
    it would be better to make visible for a while the not null columns of the table/block
    i suppose that the block is insert allowed and you are using table as the source of the block and not any procedures or something...

  • How to edit only the selected record in Oracle forms 6i

    Hi,
    I have a form which has three control blocks.
    First block is for search criteria, The results in the second block are displayed based on the values entered in the first block. Second block is a multi record block.
    Below is my requirement:
    I want to edit the record in the second block, based on the cursor position.
    For EX: If the cursor is placed on the first record, all the fields in the first record should be in the editable mode.
                  If I move the cursor down, the next record should be editable and the previous record should again go back to non editable mode.
    I have tried using :system.cursor_record, but it's applying the editable property to all fields, irrespective of the cursor position.
    Any suggestions would be of great help.
    Thanks
    Deepthi

    Deepthi,
    Why would you need to do this...it seems unnecessary to me because your user can only edit the record they are physically at.  So, if your user is in record 3 he/she can't edit record 5.
    Now, to the specific issue you are having - if you are using the SET_ITEM_PROPERTY() built-in to make a record "Editable" then what you are seeing is expected results.  The SET_ITEM_PROPERTY() built-in affects ALL instances of a specific item.  If you need to set item instance specific properties then you need to use the SET_ITEM_INSTANCE_PROPERTY() built-in.  However, this built-in does not have the same set of properties that it can set.  Take a look at the Forms Help to compare these built-ins.
    If you must make each record editiable as your user navigates through them here is how I would attempt this.  I must reiterate however, I really don't think this is necessary...but I don't know your requirements .
    1.  Create a Forms parameter to caputure the CURRENT and PREVIOUS Record number.
    I prefer a parameter object over a Global because you can't choose the data type of a Global so you have to cast the value to accurately perform any numeric calculations on a Global.
    2.  Create/update When-New-Record-Instance trigger...
    /* Sample When-New-Record-Instance... */
    BEGIN
       :PARAMETER.Prev_Record := :PARAMETER.Curr_Record;
       :PARAMETER.Curr_Record := :SYSTEM.Trigger_Record;
       IF ( :PARAMETER.Prev_Record != :PARAMETER.Curr_Record) THEN
         -- Make the previous record the user was at Non-Editable...
         Set_Item_Instance_Property('YOUR_BLOCK.YOUR_1st_BLOCK_ITEM', INSERT_ALLOWED, PROPERTY_FALSE);
         Set_Item_Instance_Property('YOUR_BLOCK.YOUR_1st_BLOCK_ITEM', UPDATE_ALLOWED, PROPERTY_FALSE);
         -- You MUST do this for each of the items in the row of your multirecord block.  There is no built-in to set the properties
         -- all of the items in a row...
       END IF;
       -- Now make the current record editable...
         Set_Item_Instance_Property('YOUR_BLOCK.YOUR_1st_BLOCK_ITEM', INSERT_ALLOWED, PROPERTY_TRUE);
         Set_Item_Instance_Property('YOUR_BLOCK.YOUR_1st_BLOCK_ITEM', UPDATE_ALLOWED, PROPERTY_TRUE);
         -- You MUST do this for each of the items in the row of your multirecord block.  There is no built-in to set the properties
         -- all of the items in a row...
    END;
    This sample code is untested and it meant to show you the logic, not the actual functioning code.
    Hope this helps.
    Craig...

  • How to commit each record in Oracle Form Personalization

    Hi,
    how to commit each record with out using save button in form...my requirement is when cursor goes to next record it vil automatically stored in database please give me your valuable suggestion...
    Actual Requirement:
    here we need to give the locators(it is  number) whenever the cursor goes to next record it vil automatically incremented by 1(i wrote query for incremetation) and previous one vil be stored in database.
    Here i am using WHEN NEW ITEM INSTANCE IS USED Trigger..
    Thank You,
    Regards,
    Putta

    Hi,
    The commit should be done by the form, or whatever raises the business event.
    The API fires the event in the same transaction (unless the subscription is deferred), and then the commit is issued. This commits the transaction, and all actions of the event subscription.
    If the subscription is deferred, then the concurrent request which processes the subscription will issue the commit on completion.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • "Bad Applet class name" error while recording on Oracle Forms 11g through OpenScript (JRE 1.7.0_17)

    Hi,
    I am trying to record automation functional test script on Oracle Forms 11g using OpenScript.
    Able to open the browser, but after accessing application URL, getting application error as "Bad Applet class name"
    Java Plug-in 10.17.2.02
    Using JRE version 1.7.0_17-b02 Java HotSpot(TM) Client VM
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    SSV dialog is suppressed........
    cracked oracle.forms.engine.Main
    Loading cached Forms Jars ...
    Is this version (Oracle forms 11g, JRE 1.7.0_17) supported by OATS-OpenScript ?
    Please advise if there is any work around here.
    Thanks.

    From the last OATS release notes available in the C:\OracleATS\docs directory:
    4.1 Oracle Functional Testing/OpenScript
    Oracle Functional Testing’s OpenScript scripting platform has the following system
    requirements:
    ■ Operating System (32-bit and 64-bit versions): Windows XP, Windows Vista,
    Windows 2003, Windows 7, Windows 2008, Windows 2008 R2.
    ■ Memory: Minimum 1 GB
    ■ System: x86, 32-bit or 64-bit processor, 2.6 GHz or faster
    ■ Disk Space: 4 GB minimum
    ■ Browser: Internet Explorer 7.x, 8.x., 9.x; Firefox 3.5/3.6, 6.x, 10; Chrome 27+
    (playback only).
    ■ Java Runtime Environment: JRE 1.6 minimum (up to build 38), JRE 1.7 (up to build
    11) .
    So basically, it's not supported... Can you try with another JRE version?
    As always don't forget to run OpenScript as administrator on W7/8 or equivalent
    JB

  • Display Hint Text in Oracle Forms 6i at Text Item

    Dear all seniors
    I want to show Hint text at Text Item in Oracle Forms 6i.
    when my cursor Focus goes at that item. I mean when I go with Tab key or Enter button then it show display text.
    even though my mouse is not on that item.
    please how it would be possible
    thanks.
    G.Y

    Please create a display_item(for eg. Disp_Mess) just below the text field (For eg:-MyField) where you want to show hint. And then assighn Hint text to "DISP_MESS" in NEW-FORM-INSTANCE or at Initial value. Then create a PRE-TEXT-ITEM and POST-TEXT-ITEM trigger for MyField.
    -- PRE-TEXT-ITEM trigger write following code.
    SET_ITEM_PROPERTY('DISP_MESS',VISIBLE,PROPERTY_TRUE);
    --POST-TEXT-ITEM write following code.
    SET_ITEM_PROPERTY('DISP_MESS',VISIBLE,PROPERTY_FALSE);
    It will work for you.
    Regards
    Ahamed Rafeeque Cherkala

  • Displaying TIFF images in Oracle Forms 6i

    Hello, friends!
    I am working in Oracle Forms 6.0.8 (that ancient tool) and encounter a problem with displaying TIFF images.
    I have a number of scanned images and some of them are displayed and some are not. I've tried both extracting them from the database or from the file system (using READ_IMAGE_FILE). Sometimes I am getting just blank field in my image item and sometimes (after using READ_IMAGE_FILE) I get the error FRM-47100 (cannot read image file). Of course I've checked that all the files are displayed using standard tools for displaying TIFFs.
    Basically the question is what kind of TIFF is considered valid and readable by Oracle Forms.
    Analyzing TIFF tags actually gave me nothing: I have a pair of files with tags different only in image width/length and a number of rows/strip (but even those values are close), and one of the file is displayed correctly while the other is not. The thing I noticed is that invalid files are using compression type of CCITT Group 4.
    Possibly Oracle Forms follows TIFF specification only to certain extent and does not support all the extensions, while sometimes the problems are not visible to user.
    As a result of my work I need some automatic tool that converts undisplayable TIFF files to displayable ones but firstly I am to determine where the problem is. And it would be very good to have a prooflink that approves my decision.
    Looking forward to any help! Thanks in advance.

    Thanks to everybody, but I'm afraid my files don't contain any EXIF tags (although TIFF seems to support them). The file doesn't contain any tags with IDs greater than 0x7FFF but only core TIFF tags (with IDs of lower numbers). Moreover I have a file with exactly the same set of tags (but the values are a bit different) which is displayed properly.
    I've shared the issued file (nondisplayable) on the following link: [https://rapidshare.com/files/3137807470/2.tif]
    If anyone could tell me why isn't it displayed in Forms I would be very grateful.

  • Need to update mutli record in oracle forms - Urgent please

    Hi,
    We are using Oracle apps release 11i - Oracle forms 6i.
    I have a field "project_start_date" in project_block in a custom form. There is another multi-record block called role_block in the same custom form and it has a field named start_date. Requirement is when ever I make change in the project_start_date in project_block, that should reflect in role_block.start_date. I tried different means and could update only the very first record of the multi-record block - role_block. I need to update all the records in the role_block with the same project_start_date. Used looping and several other methods. But could not achieve. Any help is really appreciated.
    Thanks
    Akil

    Please first read this https://forums.oracle.com/forums/ann.jspa?annID=432
    We are using Oracle apps release 11i - Oracle forms 6i.I can't understand this together.
    I have a field "project_start_date" in project_block in a custom form. There is another multi-record block called role_block in the same custom form and it has a field named start_date. Requirement is when ever I make change in the project_start_date in project_block, that should reflect in role_block.start_date. I tried different means and could update only the very first record of the multi-record block - role_block. I need to update all the records in the role_block with the same project_start_date. Used looping and several other methods. But could not achieve. Any help is really appreciated.
    Thanks
    AkilIs there any relation between project_block and role_block ?
    Do u want to update corresponding column (specific filed) of role_block when updating project_start_date in forms? How may rows will be updated for one project_start_date update ? one or multiple or all ?

  • How to process next record in oracle PLSQL

    Hi,
    I am processing below record set with the help of BULK COLLECT in Oracle PLSQL Procedure. While processing I am checking model is one that need not be substituted. If it is 'NA' or 'N/A', I need process next record (marked as bold in code snipet)
    Please guide me how to do it ?
    TYPE t_get_money IS TABLE OF c_get_money%ROWTYPE INDEX BY BINARY_INTEGER;
    L_money t_get_money ;
    L_subst_model VARCHAR2(40);
    L_Notify_Manager     VARCHAR2(1);
    L_grade          VARCHAR2(20);
    L_Error_Message     VARCHAR2(1);
    BEGIN
    OPEN c_get_money ;
    FETCH c_get_money BULK COLLECT INTO L_money ;
    CLOSE c_get_money;
    FOR I IN 1..L_money.count LOOP
    -- check if the model is one that need not be substituted
    IF (upper(L_money(i). subst_model) in ('N/A', 'NA')
    THEN
    L_NOTIFY_MANAGER(I) := 'Y';
    L_GRADE(I) := 'ERROR';
    L_error_message(i) := 'substitute Model is not N/A or NA' ;
    -------Here I want to process NEXT RECORD--------
    END IF ;
    END;

    One of the solution for below version of 11g...
    DECLARE
         TYPE t_get_money IS TABLE OF c_get_money%ROWTYPE
                                       INDEX BY BINARY_INTEGER;
         L_money              t_get_money;
         L_subst_model        VARCHAR2 (40);
         L_Notify_Manager   VARCHAR2 (1);
         L_grade              VARCHAR2 (20);
         L_Error_Message    VARCHAR2 (1);
    BEGIN
         OPEN c_get_money;
         FETCH c_get_money
         BULK COLLECT INTO L_money;
         CLOSE c_get_money;
         FOR I IN 1 .. L_money.COUNT LOOP
              IF UPPER (L_money (i).subst_model) IN ('N/A', 'NA') THEN
                   GOTO Nextrecord;
              END IF;
              L_NOTIFY_MANAGER (I)   := 'Y';
              L_GRADE (I)              := 'ERROR';
              L_error_message (i)    := 'substitute Model is not N/A or NA';
            <<Nextrecord>>
              NULL;
         END LOOP;
    END;One of the solution for 11gR1 and above...
    DECLARE
         TYPE t_get_money IS TABLE OF c_get_money%ROWTYPE
                                       INDEX BY BINARY_INTEGER;
         L_money              t_get_money;
         L_subst_model        VARCHAR2 (40);
         L_Notify_Manager   VARCHAR2 (1);
         L_grade              VARCHAR2 (20);
         L_Error_Message    VARCHAR2 (1);
    BEGIN
         OPEN c_get_money;
         FETCH c_get_money
         BULK COLLECT INTO L_money;
         CLOSE c_get_money;
         FOR I IN 1 .. L_money.COUNT LOOP
              IF UPPER (L_money (i).subst_model) IN ('N/A', 'NA') THEN
                   CONTINUE;
              END IF;
              L_NOTIFY_MANAGER (I)   := 'Y';
              L_GRADE (I)              := 'ERROR';
              L_error_message (i)    := 'substitute Model is not N/A or NA';
         END LOOP;
    END;

  • Create NEXT RECORD button on form

    I want to create a NEXT RECORD and PREVIOUS RECORD button on my form. how do I do this so that the buttons are function.

    Review the discussions at
    http://forums.oracle.com/forums/search.jspa?threadID=&q=get+next+record+process&objID=f137

  • Need profile option for determining DateTime format in Oracle Forms

    Hello All,
    I also have requirement where I need to read the date format in which Oracle Forms displays date values.
    As per updates to [this thread|https://forums.oracle.com/forums/thread.jspa?messageID=10285119] , I just need to read the profile option "ICX: Date format mask" ("ICX_DATE_FORMAT_MASK"), and reformat the date value to my required target format.
    This is good for the date type of fields. But what about the profile option that determines "datetime" formats in Oracle Forms ?
    Appreciate any help.
    Thanks
    Bhaskar

    Are you linking the host script to fndcpesr? E.g.:
    Host script defined with prog extension:
    XXSCRIPT.prog
    Move it to relevant dir:
    $XX_TOP/bin
    Create a soft link to fndcpesr
    ln -s $FND_TOP/bin/fndcpesr XXSCRIPT

  • Replacement for Exit_Menu Built-in in Oracle Forms 10g

    Hi All,
    Is there any replacement available for Exit_Menu in oracle forms 10g?.
    Regards,
    Prasad.

    No. Menus built-in associated with full-screen display and character mode have been removed in 10g.

  • Openscript crashing abruptly while trying to record on Oracle Forms

    Hi ,
    I am having issues with OpenScript tool where it is crashing/closing when I am trying to record some actions on Oracle Forms.It seems like a memory issue but I am not sure how to rectify it or investigate what is the cause.Are there any temp files which needs to be cleared ?Are there any logs which I can check to see what the issue is?I am using a Windows-7 machine and running OATS 9.3.
    Thanks,
    Megha
    Edited by: Megha_Agarwal on 23/08/2012 19:45

    Hello Megha
    You can try the following:
    Go to your shortcut to OpenScript in your Programs menu, and right click on it. Select Properties.
    You will see Popup OpenScript Properties. Ther is Shortcut tab located text box Target. Copy the content of this text box in some notepad file, as a back up, and increase Xmx to 1024 for example
    C:\OracleATS\openScript\OpenScript.exe -configuration openscript_configuration -vm C:\OracleATS\openScript\jre\bin\java.exe -vmargs -Xmx512m -XX:MaxPermSize=256m
    You can try different values.
    Let us know the result
    Cheers
    JB

  • Displaying Chinese Character in Oracle Form 6i using Oracle 11g Database

    Hi,
    Please, can anyone send me the solution for displaying the Chinese characters in Oracle Form 6i using Oracle 11g database and also
    the configuration that has to be implemented.Its urgent.
    Thank You,
    Sridhar.T

    displaying the Chinese characters in Oracle Form 6i using Oracle 11g database I'm afraid you might have problems... see Implementing Chinese language in Oracle 11g

  • Report for displaying info record scale prices

    Hi all,
    Can any one provide me the sample code for a report  displaying info record scale prices.
    Thanks,
    Suresh

    Check t.code MEKP.

Maybe you are looking for

  • Can't copy, cut & paste.

    I just bought an HP TouchSmart520 PC & am trying to figure out how to copy, cut & paste. Clicking on the R mouse doesn't even have it as an option. Please help!

  • [svn:osmf:] 10425: Add initial unit tests for VASTParser.

    Revision: 10425 Author:   [email protected] Date:     2009-09-18 17:35:58 -0700 (Fri, 18 Sep 2009) Log Message: Add initial unit tests for VASTParser.  Minor changes to parsing code. Modified Paths:     osmf/trunk/libs/VAST/org/openvideoplayer/vast/m

  • Can I put lightroom on 2 computers

    I bought lightroom from the web site as a download and now want to put it on my lap top as well, do I have to purchase it again?

  • Return year, quarter, month and week from a date

    I use this to convert a date filed to year_week, year_month, year_quarter and year. But when I use it in views I got problem with queries, they take long time... Is this the best way to do this? Select  to_char(rec_date, 'yyyy') || to_char(rec_date,

  • ALL_SDO_GEOM_METADATA not reading updates made to USER_SDO_GEOM_METADATA

    Hello All, I needed to change the SRID of my SDO objects that were not correct in the 10g database. I updated the corresponding entry in the USER_SDO_GEOM_METADATA table. There are some triggers on the update that are still causing an error saying th