Go_Block problem

hi to all
using form6i and run in client server:
i have a button and trigger when button pressed.
go_block('a');
go_Block('b');
the problem is when i click the button only one block appear. my canvas type is stacked and i changed the width and height of every canvass so it will fit the two blocks in the screen ..

Wich one do you see? Try a show_view('canvas name here') after the go_block.

Similar Messages

  • Problem with GO_BLOCK

    I have a procedure where I initialize some globals variables. In an other procedure, first, I display the content of one of my globals variables and I can see it. Second, I call the GO_BLOCK built_in and after, I display again the content of the same global variable but it is empty !!! What was happening ?

    Maybe some code in a When-New-Bloc-Instance, When-New-Record-Instance, When-new-Item-Instance ?
    Open the PL/SQL search dialog box, enter your GLOBAL name and search into your module.
    Francois

  • Problem in using client_image.read_image_file

    Hi all
    I want to load a picture file into a forms item at Develeoper Forms 10g Rel.2 with the following procedure, but it doesnt work and i also get no error.
    PROCEDURE import_image
    IS
    vFileName VARCHAR2(512);
    BEGIN
    -- Transfer Picture from File Directory to Forms Item.
    GO_BLOCK('FOTO');
    SET_BLOCK_PROPERTY(FIND_BLOCK('FOTO'), DEFAULT_WHERE,
    'natpers_oid = 55664');
    EXECUTE_QUERY;
    SET_BLOCK_PROPERTY(FIND_BLOCK('FOTO'), INSERT_ALLOWED,
    PROPERTY_TRUE);
    SET_BLOCK_PROPERTY(FIND_BLOCK('FOTO'), UPDATE_ALLOWED,
    PROPERTY_TRUE);
    SET_ITEM_PROPERTY(FIND_ITEM('FOTO.FOTO'), INSERT_ALLOWED,
    PROPERTY_TRUE);
    SET_ITEM_PROPERTY(FIND_ITEM('FOTO.FOTO'), UPDATE_ALLOWED,
    PROPERTY_TRUE);
    BEGIN
    vFileName := NULL;
    vFileName := webutil_file.file_selection_dialog('C:\Temp\', '*',
    '|Foto Dateien(*.bmp)|*.bmp|', 'Foto');
    END;
    IF vFileName IS NOT NULL THEN
    client_image.read_image_file(vFileName, 'BMP', FIND_ITEM('FOTO.FOTO'));
    client_host('cmd DEL ' || vFileName);
    END IF;
    END import_image;
    I think the WebUtil 1.0.6 works properly because the 'webutil_file.file_selection_dialog' (see above) works fine.
    Now can somebody give me a tip?
    Best regards
    Martin

    I found the problem :-)
    When i change the following parameter in the file webutil.cfg it works fine.
    transfer.appsrv.enabled=TRUE (old: FALSE)
    Martin

  • Problem when trying to refresh oracle screens with latest data

    hello experts,
    i have one problem,i want to refresh the oracle screen with the latest data from the data
    base.
    It is a two stage process.At first step one user will select a row from the screen and then he will press a button .
    now the second screen will appear and the detail of the employee will be displayed.
    First step has been completed and the data is coming in the second form via parameters and i can see the full information of the employee.
    Now i want to refresh the oracle form i.e. suppose if my dba has made any changes in the oracle table( EMP table) i want that after pressing the refresh button user can see the
    latest data from the database.
    in WHEN_BUTTON_PRESSED trigger i have written this codes.
    enter_query;
    execute_query;
    but they are not giving the expected result.
    And one more thing please suggest whether in the second form i should use database item
    or non database item.
    When i am using database item when i am trying to close second from one pop up is appearing
    and asking that whether i want to save the changes.
    please suggest how can i remove this message from my application.
    Regards
    Anutosh

    Hi,
    what data did you transfer via parameters to the second form ?
    how did you populate the datablock in the second form ?
    Typical solution would be:
    (For my example the block is both forms is named EMP, and is based on the table SCOTT.EMP)
    In Form 1, transfer the primary key-value of the current record to a global or parameter (will use global in my example):
    e.g. you have a WHEN-BUTTON-PRESSED-Trigger with the following code:
    <pre>
    :GLOBAL.EMPNO:=:EMP.EMPNO;
    CALL_FORM('FORM2');
    </pre>
    In Form 2, you have a WHEN-NEW-FORM-INSTANCE-Trigger with code:
    <pre>
    DEFAULT_VALUE('GLOBAL.EMPNO', NULL);
    IF :GLOBAL.EMPNO IS NOT NULL THEN
    GO_BLOCK('EMP');
    EXECUTE_QUERY;
    :GLOBAL.EMPNO:=NULL;
    END IF;
    </pre>
    On block EMP in Form 2 there is a PRE-QUERY-Trigger with following code:
    <pre>
    IF :GLOBAL.EMPNO IS NOT NULL THEN
    :EMP.EMPNO:=:GLOBAL.EMPNO;
    END IF;
    </pre>
    And at last, in your refresh-button would be the following code:
    <pre>
    :GLOBAL.EMPNO:=:EMP.EMPNO;
    GO_BLOCK('EMP');
    EXECUTE_QUERY;
    :GLOBAL.EMPNO:=NULL;
    </pre>
    Hope this helps

  • Problem with set_item_instance_property and set_lov_property

    Hello guys,
    I am using oracle forms 6i and new to it. I am having a multi data block.
    I am facing a problem when I try to set the item instance property with respect to the list type.
    1) Basically, I am having a list item having three types MANUAL, INVOICE and BOE. All are independent of each other. I am facing the problem with the MANUAL type.
    I have written this code on When-Validate-Trigger of the list item as well as When-List-Changed. Also I am not setting the properties of any items initially(neither on When-New-Form-Instance nor on When-New-Block-Instance).
    if block.doc_type = 'MANUAL' then
    set_item_instance_property('BLOCK.VENDOR_NO', to_number(:system.cursor_record), REQUIRED,PROPERTY_TRUE);
    end if;
    But I am getting this warning/error frm 41383 - no such property for set_item_instance_property on both the triggers for the first time when I open the form and thereafter. During the same form session, if I click on the next line it shows a message Field cannot be empty and directs to the item where I compulsory need to insert a value. I also tried using to_number(:system.trigger_record) but getting the same issue. There are many more items I need to set the same property for.
    2)The invoice item on the block/form has a LOV. Another requirement is when I select 'MANUAL' , that LOV should not appear on selection of 'MANUAL' type and the user should be able to insert the value manually and validate manually. I did use set_lov_property, but did not get the correct usage. Please assist as soon as you can.
    Edited by: 1005292 on May 20, 2013 12:04 PM

    Just out of my interest I would like to know what you exactly meant by "The :SYSTEM.CURSOR_RECORD reflects where the navigation cursor is; which could be different from the record that is initiating the event." in your reply.If you look at the Forms Help for both objects, you will see that...
    SYSTEM.CURSOR_RECORD represents the number of the record where the cursor is located. This number represents the record's current physical order in the block's list of records. The value is always a character string.
    SYSTEM.TRIGGER_RECORD represents the number of the record that Form Builder is processing. This number represents the record's current physical order in the block's list of records. The value is always a character string. Through PL/SQL you can send (using the GO_ITEM, GO_BLOCK and GO_RECORD built-ins) the interenal Forms Cursor to a different item, block or record within the current block. If, you GO to a different block or record in the same body of code and you then evaluated the :SYSTEM.CURSOR_RECORD and compared it with the :SYSTEM.TRIGGER_RECORD you would find that they are generally different.
    2) In response to the second one, do you want to say that when it I select MANUAL I do not use the set_item_property OR use this property and attach an LOV which does not return anything OR use this property, give the name of the same of the same LOV,I am using and set PROPERTY_FALSE. First a litte back ground. When an Item has an LOV assigned to it, Oracle Forms automatically displays what it calls the "LOV List Lamp" in the status bar. With Forms 9i and higher, it displays and "List of Valu..." in the status bar when an item has an LOV assigned to it. Items can have an LOV assigned during design-time or during run-time. You cannot, however, unassign an LOV during Run-time becuase the SET_ITEM_PROPERTY built-in requires you to pass a valid LOV object name.
    Well, as I was writing this, it occured to me that you will not be able to set the LOV assigned to your multi-row item at run-time either because once you assign an LOV to an item in a multi-row block, all occurances of the Item will have the LOV assigned. This being the case, I would recommend using a button and give it the appearance of enabled or disabled by using the VISUAL_ATTRIBUTE property and add code to the button so that if the row status is MANUAL then nothing happens. Using this method, you would create two Visual Attribute (VA) objects; ENABLED and DISABLED. The ENABLED VA would make the button look like a normal button while the DISABLED VA would make the button look like it is disabled (grey out button text, etc).
    I would also like to know when to use set_lov_property and if you could explain in brief with an example.The only time I have used the SET_LOV_PROPERTY() built-in is when I needed to change the Record Group query assigned to the LOV. We have a form where depending on the "Action" selected, the LOV for a certain item needed to change. The values returned by the LOV were still assigned to the same block items, so rather than create multiple LOVs and set the Column Mapping for each LOV, I just create a Record Group object for each action and then used the SET_LOV_PROPERTY() built-in to change the LOV TITLE and GROUP_NAME. This way, I was able to reuse the LOV and it's existing column mappings while changing the record group that provided the data for the LOV.
    The problem lies when I am entering the fields after the invoice number. The fields before the invoice no including the field of invoice no hold the value entered but when I click/press a tab key to go on to the next field the values in the earlier fields(i.e fields before invoice no and invoice no field) disappear i.e. the values do not hold their place and again prompts me from start to enter the vendor no.Are you navigating to a new row/record? That could explain the disappearing data. If not, then I would look for a trigger on the item you're navigating too or for a Block level When-New-Item-Instance trigger that has code that sets the items to null. It sounds like something in the design is causing the field values to disappear (get set to NULL) so I would look at what happens in your form when a navigation event occurs.
    @Andreas - actually, REQUIRED is a valid property for the Set-Item-Instance-Property() built-in. ;)
    Hope this helps,
    Craig...

  • Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination

    Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
    Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
    Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
    Statements in called form (Form name: FORM_CHILD):
    go_block('display_block') ;
    do_key('execute_query') ;
    -- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
    -- from TABLE_A.
    -- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
    -- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
    if user_choice = 'YES' then
    commit ;
    else
    rollback ;
    end if ;
    Statements in calling forms:
    There are two calling forms having following statements and it is going to call the above said called form.
    CALLING FORM 1
    Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...; Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    CALLING FORM 2:
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...;
    insert into table_b ...;
    Our understanding:
    Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
    So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
    After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
    Actual happenings or Mis-behavior:
    Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
    The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
    Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
    Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
    Our mail ID: [email protected]
    Thanks a lot in advance.

    You have several problems:
    1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
    2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
    All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
    Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.

  • Client_Image.READ_IMAGE_FILE problems

    Hi, I have search all over OTN and the web and can't seem to find a solution to my problem. Im using Forms 10gR2, and am trying to display a TIFF image in a form. I am not getting any errors, its just not displaying the image at all.
    I have the images stored in C:\temp\0-GRAPHICS\. I have looked at the webutil.cfg file and updated it with the following:
    #NOTE: By default the file transfer is disabled as a security measure
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    transfer.appsrv.workAreaRoot=c:\TEMP
    transfer.appsrv.accessControl=TRUE
    #List transfer.appsrv.read.<n> directories
    transfer.appsrv.read.1=c:\temp
    transfer.appsrv.read.2=c:\
    transfer.appsrv.read.3=c:\DevSuite10_1_2
    #List transfer.appsrv.write.<n> directories
    transfer.appsrv.write.1=c:\temp
    transfer.appsrv.write.2=c:\
    transfer.appsrv.write.3=c:\DevSuite10_1_2
    When I run the code, i get no error, it seems to work, just no picture displayed. Here is my code
    When-Button-Pressed trigger:
    DECLARE
    tiff_image_dir VARCHAR2(80) := 'C:\temp\0-GRAPHICS\';
      photo_filename VARCHAR2(80);
    BEGIN /* ** Set the message level high so we can gracefully handle ** an error reading the file if it occurs */
      :CB_PLATE_TIFF.ESL_NUMBER := :UNION_HDRS.ESL_NO;
      :CB_PLATE_TIFF.PLATE_NUM := :EIF_ONE_PPB.EIF_PLATE_NO;
      :System.Message_Level := '25';
      /* ** After fetching an employee record, take the employee's ** Userid and concatenate the '.TIF' extension to derive **
      the filename from which to load the TIFF image. The EMP ** record has a non-database image item named 'EMP_PHOTO' ** into which we read the image. */
      photo_filename := tiff_image_dir||:CB_PLATE_TIFF.ESL_NUMBER||'\'||:CB_PLATE_TIFF.PLATE_NUM||'.tif';
      /* ** For example 'photo_filename' might look like: ** ** /usr/staff/photos/jgetty.tif ** ------ ** ** Now, read in the appropriate image. */
      client_image.READ_IMAGE_FILE(photo_filename, 'TIFF', 'CB_PLATE_TIFF.IMG_PLATE');
      IF NOT FORM_SUCCESS THEN
      MESSAGE('The TIFF file '||:CB_PLATE_TIFF.PLATE_NUM||'.tif does not exist.');
      END IF;
      :SYSTEM.MESSAGE_LEVEL := '0';
      GO_BLOCK('CB_PLATE_TIFF');
    END;
    Am i not initializing the tiff_image_dir properly? Thanks for any help.

    Without actually being able to test your form, my only remaining guess is that the version you are using has a defect.  Since you did not mention exactly which version you are using, I will guess and say that you are using an unpatched version.  Please ensure that you are using Forms 10.1.2.3.  If you are not using this patch version, I recommend you download and install it.  You must have a current MyOracleSupport (and Support) account to do so.  The patch ID number is:  5983622
    Also, since version 10 is no longer entitled to Premiere Support, it might be a good time to consider upgrading to the latest release, 11.1.2.2
    http://www.oracle.com/technetwork/developer-tools/forms/downloads
    Installing WebLogic Server 10.3.6 is a prerequisite to installing Forms/Reports 11.1.2.2, so be sure to download and install it first.  Be sure to review the product documentation before installing any software.
    http://docs.oracle.com/cd/E48391_01/index.htm

  • Query in item problem

    Hellou everybody.
    I need your help. I am using forms 6i and i have a block with some non DB items. But items are synchronize with DB items for viewing results. I use this items for diplaying results from DB tables. In enter query mode i write condition in this text items and execute query.
    My problem is that i have text item which is VARCHAR2 type and I need to enter the condition for example > 1000. But i don't know how to convert this field to number. When i execute query under char type it not work properly (other result). I tried to change data type to number but i can't because it's not alowed to mixed types.
    select * from table_name where pag_cis > 100 - i need this
    select * from table_name where pag_cis > '100' - i have this
    Can you help me???

    You may use the set_block_property procedure built-in and the 'default_where' property so as to execute the query using the contents of your item (with the name of column , of course).
    Afterwards , you navigate to the db items block (with go_block('blockname')) and execute the query (built-in 'execute_query').
    Hope it helps
    Sim

  • Problem in block based Query

    Respected Guru's
    I have a problem eith block bassed query.i have already used this block based query and it is working too.
    But here i am facing the the problem.why becuz i have used a global variable to pass value for execute it.
    and used 'set_block_property' to execute this query ..
    go_block('block name ')
    execute_query;
    But it si showing unable to perform the query..
    How i do this?? plez help me out...

    Dear...........
    There are some possible reasons.
    1- The items that are in data block , there is some field data is not database field and you set the property of this item is
    "Data Base Item" = 'Yes' , means this field is not in table.
    2- user right problem
    3- see the block property where set the property QUERY = NO\
    THX.

  • (another) stacked canvas on content canvas problem

    I've searched the forums for the last 2+ hours and can't find a solution for my problem, although there are hundreds of questions on this subject.
    I have a stacked canvas on top of a content canvas. The canvases share the same window. They also share a data block. I added radio buttons on the main canvas to "show/hide" the stacked (my ultimate goal is to have 2-3 stacked and toggle. When hide, the stacked canvas is hidden, but when i click show, it is not. I understand reading all the posts that the block with focus will display, and I've added both a go_block and go_item prior to the show_view. Below is my code. MEL_DETAILS is content and MEL_LINE_ITEM is stacked.
    IF :stack = 'SHOW_STACK' THEN
    GO_BLOCK('MEL_ITEM');
    GO_ITEM('MEL_ITEM.MIS_PROJECT_NO');
    SHOW_VIEW('MEL_LINE_ITEM');
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_true);
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', display_position, 718, 583);
    SET_ITEM_PROPERTY('PROJECTS.STACK',MOUSE_NAVIGATE,PROPERTY_FALSE); -- radio button
    ELSif :stack = 'HIDE_STACK' THEN
    HIDE_VIEW('MEL_LINE_ITEM');
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_false);
    SET_ITEM_PROPERTY('PROJECTS.STACK',MOUSE_NAVIGATE,PROPERTY_TRUE);
    END IF;

    user12198246 wrote:
    I've searched the forums for the last 2+ hours and can't find a solution for my problem, although there are hundreds of questions on this subject.
    I have a stacked canvas on top of a content canvas. The canvases share the same window. They also share a data block. I added radio buttons on the main canvas to "show/hide" the stacked (my ultimate goal is to have 2-3 stacked and toggle. When hide, the stacked canvas is hidden, but when i click show, it is not. I understand reading all the posts that the block with focus will display, and I've added both a go_block and go_item prior to the show_view. Below is my code. MEL_DETAILS is content and MEL_LINE_ITEM is stacked.
    IF :stack = 'SHOW_STACK' THEN
    GO_BLOCK('MEL_ITEM');
    GO_ITEM('MEL_ITEM.MIS_PROJECT_NO');
    SHOW_VIEW('MEL_LINE_ITEM');
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_true);
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', display_position, 718, 583);
    SET_ITEM_PROPERTY('PROJECTS.STACK',MOUSE_NAVIGATE,PROPERTY_FALSE); -- radio button
    ELSif :stack = 'HIDE_STACK' THEN
    HIDE_VIEW('MEL_LINE_ITEM');
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_false);
    SET_ITEM_PROPERTY('PROJECTS.STACK',MOUSE_NAVIGATE,PROPERTY_TRUE);
    END IF;Here, it seems two problem..
    The line..
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_true);
    and
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_false);No needed
    Hope this helps
    Hamid

  • Problem: trying to update all detail rows on pre-commit (MASTER DETAIL FORM

    Hi:
    I got a MASTER DETAIL form... and I need to update every detail row of this form (if the master was updated) before commiting the changes. the problem is that i cannot do that for instance in PRE-COMMIT or ON-COMMIT... it's an "illegal operation". I achieved part of it by coding KEY-COMMIT... but that did not solve the all problem. first take a look of the kind of code i want execute before commiting.
    form trigger key-commit code is is somehow like this:
    DECLARE
    tot_line NUMBER (3);
    line NUMBER (3);
    begin
    IF NAME_IN ('system.form_status') = 'CHANGED'
    THEN
    GO_BLOCK ('DETAIL');
    LAST_RECORD;
    tot_line := GET_BLOCK_PROPERTY ('DETAIL', current_record);
    FIRST_RECORD;
    line:= 1;
    LOOP
    :detail.quant := :detail.quant + 1;
    EXIT WHEN line= tot_line;
    next_record;
    line:= line+ 1;
    END LOOP;
    FIRST_RECORD;
    GO_BLOCK ('MASTER');
    END IF;
    COMMIT;
    end;
    The problem is for instance when the users close form in the "X" button (right top, near minimize form) ... If they do that Forms ask "Do you want to save changes?" ... and with this i do not execute the update of the detail rows...
    But there are other situations when this happens... for instance if EXECUTE_QUERY when i change a record...
    Anyone help?
    Joao Oliveira

    Use PRE-UPDATE trigger (Master block).
    begin
    update <detail_table>
    set quant + 1
    where <detail_table>.<relaition_column1> = :<Master_block>.<relaition_item1>
    and <detail_table>.<relaition_columnN> = :<Master_block>.<relaition_itemN>
    and <detail_block_WHERE>;
    EXCEPTION WHEN OTHERS THEN NULL;
    end;

  • Problem on forms for serial number generation with last record next_record.

    Hi Experts,
    currently i'm facing one problem like :
    i'm populating one receipt detail in Multi block , like when user key in one receipt number that time record should go in first record ,and if they key in second receipt number then record should go in second record . mean to say every time record go in last record ..but the problem is i want to generate Serial no correspondence to every last record ..
    here is my approch :
    cursor c1 is
    select * from table
    where cname =:blk_name.clm_name.
    Last record;
    next_record;
    for v1 in c1 loop
    processed record;
    next_record;
    end loop;
    last_record;
    go_block(___);
    first_record;
    :sno := system.cursor_record ;
    next_reocrd;
    end loop;
    first_record;
    And in block level i'm writing code for Serial number generation when user key in manual entry for receipt detail:
    :blk_name.coulumn_name := :system. cursor_record;
    so in this approach their is no problem it is working properly but the problem is that
    when user fetch one receipt automatically and then after he want to enter next record manually and he decided to go in detail block ,
    and once he reached in detail block that time block level trigger i firing .ans serial number 2 generated and then suddenly he came to know no i want to fetch next record automatically mean to say now user going again master block and fetching next receipt detail ,
    but the problem is when user leaving seccond sr no and going in master block and population next receipt detail that time cursor going on 3 record
    but logically have to replace the second Serial no and generate the again serial number 2 record population .mean to say its not refreshing last_record..
    so i'm appreciating is anyone if came accoross this type of issue please corrrect my code and send updated code ..plsssssssssssssssssssssssssssssss
    Thanks
    Abhishek
    [email protected]

    hi
    I put this below code on when_new_record_instance on block level..
    :blk_name.column_name :=system.cursor_record;
    so can you please help me.....
    Thanks
    Abhishek

  • NEXT_RECORD problem

    Hi All,
    I am using Forms6.0
    I have two database blocks A & B. For each record in A, i may insert a record in B depending on the user entering values. Problem is that even if user enters values for two records, only one is inserted in table of block B. The code is as follows:
    PROCEDURE update_B IS
    BEGIN
    delete_block('B') ;
    GO_BLOCK('A') ;
    FIRST_RECORD ;
    LOOP
    GO_BLOCK('A') ;
    IF :system.record_status = 'NEW' THEN
    EXIT ;
    END IF ;
    IF (:A.amt > 0.00) THEN
    preparing record for table of block B;
    GO_BLOCK('B') ;
    NEXT_RECORD ;
    ********problem**********
    END IF ;
    GO_BLOCK('A') ;
    IF :system.last_record = 'TRUE' THEN
    EXIT ;
    ELSE
    NEXT_RECORD ;
    END IF ;
    END LOOP ;
    END;
    Problem occurs at indicated point.I gave messages to find that at this point even for block A i reach at next record which is last record and so, it does not get updated.
    Can anyone help?

    Hi Gerd,
    The complete code is as under...And, CREATE_RECORD behaved in the same way as NEXT_RECORD. Thanks...
    PROCEDURE update_grrel IS
    BEGIN
    delete_block('grrel_blk') ;
    GO_BLOCK('gr_blk') ;
    FIRST_RECORD ;
    bmessage('first record before loop...gr adj amt= '||:gr_blk.v_ebgr_adj_amt);
    LOOP
    GO_BLOCK('gr_blk') ;
    bmessage('after loop start...gr adj amt= '||:gr_blk.v_ebgr_adj_amt);
    IF :system.record_status = 'NEW' THEN
    EXIT ;
    END IF ;
    IF (:gr_blk.v_ebgr_adj_amt > 0.00) THEN
         bmessage('preparing record...gr adj amt= '||:gr_blk.v_ebgr_adj_amt);
         :grrel_blk.ebgrrel_prod_code:=:gr_blk.ebgr_prod_code ;
    :grrel_blk.ebgrrel_ref_no:=:gr_blk.ebgr_ref_no ;
    :grrel_blk.ebgrrel_no:=:gr_blk.ebgr_no ;
    :grrel_blk.ebgrrel_serial_no:=:ctrl_blk.v_serial_no ;
    :grrel_blk.ebgrrel_shiping_bill_no:=:gr_blk.ebgr_shiping_bill_no ;
    :grrel_blk.ebgrrel_realised_amt:= :gr_blk.v_ebgr_adj_amt ;
    :grrel_blk.ebgrrel_realised_dt:=:hdr_blk.proc_dt ;
    :grrel_blk.ebgrrel_realised_status
    := :gr_blk.v_ebgrrel_realised_status;
    if (:ctrl_blk.mode='S') then
    :gr_blk.realisation_flg:= :v_ebgrrel_realised_status;
    :gr_blk.ebgr_total_realised_amt :=
    NVL(:gr_blk.ebgr_total_realised_amt,0) +
    NVL(:gr_blk.v_ebgr_adj_amt,0);
    end if;
    bmessage('aftr preparing record...gr adj amt= '||:gr_blk.v_ebgr_adj_amt);
    GO_BLOCK('grrel_blk') ;
    --NEXT_RECORD ;
    CREATE_RECORD ;
    bmessage('bfore end if...gr adj amt= '||:gr_blk.v_ebgr_adj_amt);
    END IF ;
    GO_BLOCK('gr_blk') ;
    bmessage('after end if...gr adj amt= '||:gr_blk.v_ebgr_adj_amt);
    bmessage('system.last_record= '||:system.last_record);
    IF :system.last_record = 'TRUE' THEN
    EXIT ;
    ELSE
    NEXT_RECORD ;
    END IF ;
    bmessage('before end loop...gr adj amt= '||:gr_blk.v_ebgr_adj_amt);
    END LOOP ;
    END;
    *****************************************

  • PROBLEM IN DELETE TRIGGER

    hiiii guy's
    i had made a form having two blocks and both these blocks are based on the same table and i had created a master detail relationship on this form
    Now i m trying to delete data only from the 2nd block
    if i m using the builtin function clear_record
    then when i m pressing this button the whole of my form is getting clear but i want to remove only one particular record from the second block only
    could someone plz help me out to remove this problem
    thanks guy's
    Edited by: Navdeep Kaur on Jul 23, 2009 10:52 PM

    Hi
    GO_block(blck_name);
    delete_record;
    Regards
    Vikas

  • Problem in displaying records in multi record block

    Hi all,
    I have a problem in displaying records in a multi record block in a form.
    I have 1 control block and 1 data block(multi-record block).
    Control block has one item CUSTOMER-ID. Data block has many other items related to customer.
    when a value is entered in customer-id text item, all the relavant details should be displayed in the data block.
    but, the records are overlapping in the same line in the data block, actually they have to be displayed one record per one line.
    The code is,
    IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
    GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
    FOR C1 IN C
    LOOP
    :XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
    :XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
    END LOOP;
    Please help me out..
    Thanks in advance!
    Suman

    Hi Suman
    IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
    GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
    first_record;
    FOR C1 IN C
    LOOP
    :XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
    :XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
    next_record;
    END LOOP;
    Try this. you are trying to show all the records in same line. so its overlapping.
    Thankyou
    [email protected]

Maybe you are looking for