go_block

I have one container of blocks of master and detail
to be the data
I want when I enter or tab on the last point of master, he'll be on the first point details
and when I press on enter on the last point of detail record, it will go to the next on the same block record

user628902 wrote:
I have one container of blocks of master and detail
to be the data
I want when I enter or tab on the last point of master, he'll be on the first point details
and when I press on enter on the last point of detail record, it will go to the next on the same block record

Simply change the Style of "Navigation" to "Edit Data Block" on your master block and "Change the Record" on your block of retail properties in the property palette.
It will work.

Tony

Tags: Oracle Development

Similar Questions

  • How to use GO_BLOCK in the POST_CHANGE triggering?

    Hi all

    I have a trigger post_change on a text element, I want to change the background color (using the Visual attribute) of certain items in another block according to the value of this mentioned point text.

    But when I set a value for the first time some backgrounds are changed and when I change the value the previous actions for the backgrounds are, how to erase the effects of any changes to the value.

    I wrote this code the trigger of PST-EXCHANGE on this element:

    BEGIN

    GO_BLOCK ('BLOCK1');

    SET_ITEM_PROPERTY(:SYSTEM.) CURSOR_ITEM, VISUAL_ATTRIBUTE, 'DISPLAY_ITEMS');

    LOOP

    NEXT_ITEM;

    SET_ITEM_PROPERTY(:SYSTEM.) CURSOR_ITEM, VISUAL_ATTRIBUTE, 'DISPLAY_ITEMS');

    WHEN THE OUTPUT: SYSTEM. CURSOR_ITEM = ' BLOCK1. DATE_QUERY'; -IT IS THE LAST ELEMENT IN THE BLOCK

    END LOOP;

    IF: REP_SID = '01' THEN

    SET_ITEM_PROPERTY('BLOCK1.) THE SUS, VISUAL_ATTRIBUTE, 'PAR_ITEMS');

    ELSIF: REP_SID = ' 02 "THEN

    SET_ITEM_PROPERTY('BLOCK1.) FIRST NAME ", VISUAL_ATTRIBUTE,"PAR_ITEMS");"

    ELSIF: REP_SID IN ('05', '06', '07', '08',' 09', ' 10') THEN

    SET_ITEM_PROPERTY('BLOCK1.) LIVE ', VISUAL_ATTRIBUTE, 'PAR_ITEMS');

    SET_ITEM_PROPERTY('BLOCK1.) AT', VISUAL_ATTRIBUTE, 'PAR_ITEMS');

    ELSIF: REP_SID = '20' THEN

    SET_ITEM_PROPERTY('BLOCK1.) TOO ', VISUAL_ATTRIBUTE, 'PAR_ITEMS');

    SET_ITEM_PROPERTY('BLOCK1.) DATE_QUERY', VISUAL_ATTRIBUTE, 'PAR_ITEMS');

    END IF;

    END;

    The previous code gives me this error: illegal GO_BLOCK restricted procedure. How to fix or is there another way to achieve the same goal it please?

    Thank you

    Note: I use Oracle DB 10 G, Forms 6i

    use key-next_item instead of POST_CHANGE.

    It will work.

    Also SET_ITEM_PROPERTY(:SYSTEM.) CURSOR_ITEM, VISUAL_ATTRIBUTE, 'DISPLAY_ITEMS'); does not work

    You must use

    Set_Item_Instance_Property (SYSTEM. CURSOR_ITEM, SYSTEM. CURSOR_RECORD,

    VISUAL_ATTRIBUTE, 'DISPLAY_ITEMS');

  • GO_BLOCK post_change Trigger

    Hello

    I need like when I select an item in LOV, then based on the selected item, we need to be by default values in the other block. Plase help us on this.

    Thanks in adavance.

    Riou

    RamGowda wrote:

    ... I need like when I select an item in LOV, then based on the selected item, we need to be by default values in the other block. Plase help us on this.

    Ramesh,

    The relaxation after change does not allow execution of Restricted built-ins.  The built-in function GO_BLOCK is limited.  For your condition, it would be easier to use a trigger key-ListVal on the element instead of using the trigger after change.  The key-ListVal allows all built-ins and fires when your user calls your LOV on this point.  Do not forget that the trigger key-ListVal will replace feature by default, so you need to show your LOV explicitly in the trigger, but the trigger execution is paused while the LOV is displayed and will resume when the user selects a value from the LOV.  For example, your key-ListVal trigger would like something like:

    -- Sample Key-ListVal trigger --
    BEGIN
     List_Values;
     IF ( :YOUR_BLOCK.YOUR_ITEM IS NOT NULL ) THEN
      -- Set the default values in your other block here...
     ELSE
      -- Display a message to the user to select a value from the LOV.
     END IF;
     END;
    

    Hope this helps,

    Craig...

  • Dilemma when-validate-Item and Go_Block/Execute Query

    Hey people out there - probably not a matter of surprise on this forum. I have tried to look for it and came up with a few posts but did not find solutions. If all goes well, I also did the right way to conduct a search on this forum. If this is a message for the umpteenth time on this question, I apologize.

    So, I have 2 blocks:
    1. the block command that contains the field STUDENT_ID (database item = 'n')
    2 block database which contains STUDENT_ID field (element of database = 'Y' and many other areas)

    My goal is to do an Execute_Query if the user enters the student card, then press TAB or place the MOUSE in the database block and display the record if it exists. As we know, a Go_Block is not allowed in When-validate-Item. So, I went a little more away from "simulate" this. The problem is that I'm always pulled the query Execute when the record has already been retrieved. Here's what I have so far. Thus, the trigger next-item key works fine if the user types a tab of the student card and presses. It also works very well if the user clicks on the STUDENT_BK as the trigger once - new - block - Instance that triggers calls the next key. The problem occurs when after recording was recovered and the user click on control.student_id then comes and clicks on the STUDENT_BK, the KEY NEXT-ITEM trigger fires again.

    Suggestions or pointers would be more than welcome.

    Thank you!

    CONTROL.student_id. Next-key
      if :control.student_id is not null and :SYSTEM.BLOCK_STATUS != 'CHANGED' then
        next_block;
        clear_block(NO_COMMIT);
        execute_query;
      else
        show_alert('Please enter Student ID');
      end if;
    STUDENT_BK. Once - new - block - Forum
    go_item('control.student_id');
    do_key('next_item');

    I think you remove the "value copy of the element" and add a where clause clause to your STUDENT_BK of "student_id =: CONTROL.» STUDENT_ID.

    Then when you do

    if STUDENT_BK.STUDENT_ID != :CONTROL.STUDENT_ID then
    

    It logic should endeavour to answer your second question mark block requirement when the user between the block of database STUDENT_BK. If the IDS match, the record already was questioned, if this is not the logic of your application is triggered and with the where clause added to your STUDENT_BK block, it would be in the folder that you want to.

  • Restricted procedure illegal GO_BLOCK in WHEN-VALIDATE-ITEM trigger.

    Hi people!
    There is more than one type of best practices of the question. I use Forms 6i and encounter the above error at any time. It seems that it is true very convenient to an another datablock and loop to validate a particular field. I end up creating a cursor to restore the logic which has already been built in the block. Does anyone know an easier work around? Thank you!

    The idea makes sense, but navigating to the other blocks (and even the other rows in the same block) is not allowed in a trigger validation. This is one of those strict rules Oracle Forms.

  • How to execute the query

    I want to execute a specific request, but I have no idea about this please someone help me how to a specific query, run?

    Try this.

    Yes you can write this in next item key of you text element.

    Go_Block ('Your_Block_Name');

    Set_Block_Property ('Your_Block_Name', DEFAULT_WHERE, 'STUDENT_ID =' |: STUDENT_ID);

    Execute_Query (No_Validate);

  • How to view the query

    I want to show, to execute a specific request, but I have no idea about it please some guide to the individual how run query?

    First write this in a push button.

    go_block ('Your_Blck_Name');

    Execute_Query (No_Validate);

    Copy the following code in your application before trigger and taking a point-form text and you will see the sql statement.

    It is the last line of your motion trigger.

    : Your_Block_Name.Text_Item: = Get_Item_Property ('Your_Block_Name', Last_Query);

    LAST_QUERY returns the SQL of the last request in the specified block.

  • help with the form builder

    Fit, I have the edit button and its function is that when I press the button change go IDs (text_item) and run the query

    but my problem is that when I enter text_item in any id it displays just first record

    for example

    When I enter id... 1 data display

    but I enter the id 2, 3, 4... its just id 1 information display

    Use of pre_query trigger.

    For example

    You write the code below in your button.

    Go_Block ('Your_Block_Name');

    Execute_Query (No_Validate);

    After that, you write the query pre relaxing on your query block.

    Set_Block_Property ('Your_Block_Name ', Default_Where,' Id =' |: MYSEARCHBLOCK.) Item_Id);

  • run the query

    When I press Add button I want to run my all records in the table of details... that is save to a sql table

    BEGIN

    COMMIT_FORM;

    : block.display_message: =' SAVE RECORD!        ';

    GO_BLOCK ('detail_table');

    EXECUTE_QUERY (NO_COMMIT);

    CLEAR_MESSAGE();

    end;

  • Find no records in an Excel sheet

    Hi all

    I am importing data from an excel file into oracle database. I wanted to know the number of records in an excel file and no columns using oracle webutil (Client_ole2). I received a web code that works very well, adding a NEM statement at the end of the file each time. Maybe it's not practical always, cannot ask user each time to add a statement of NEM, which in turn result in program to run infinitely.

    This is the code that is running

    DECLARE

    application Client_OLE2. Obj_Type;

    Client_OLE2 workbooks. Obj_Type;

    workbook Client_OLE2. Obj_Type;

    Client_OLE2 spreadsheets. Obj_Type;

    worksheet Client_OLE2. Obj_Type;

    worksheet2 Client_OLE2. Obj_Type;

    cell Client_OLE2. OBJ_TYPE;

    Client_OLE2 args. OBJ_TYPE;

    cell_value varchar2 (100);

    num_wrkshts NUMBER;

    wksht_name VARCHAR2 (250);

    EOD Boolean: = false;

    j integer: = 3;

    v_fName VARCHAR2 (250);

    worksheet_count number: = 0;

    BEGIN

    -Get the name of the file to open

    -v_fName: = "D:\MyDevelopment\Forms\Samples\WebUtil\Read_Excel\planets3.xls";

    v_fName: = WebUtil_File.File_Open_Dialog)

    directory_name = > "C:\". »

    -, file_name = > Get_Form_Property (:System.Current_form, Form_Name) |'. XLS

    , File_Filter = > null

    , Title = > 'Select customer filename to open.'

    );

    IF (v_fName IS NOT NULL) THEN

    -The following sets a communication with the excel worksheet

    -- --------------------------------------------------------------

    -Open the OLE application

    application: = Client_OLE2.create_obj ('Excel.Application');

    -Keep the hidden application

    Client_OLE2.set_property (application, 'Visible ','false ');

    workbooks: = Client_OLE2. Get_Obj_Property (application "Filing cabinets");

    args: = Client_OLE2. CREATE_ARGLIST;

    -Open the selected file

    -- ----------------------

    Client_OLE2.add_arg (args, v_fName);

    workbook: = Client_OLE2. GET_OBJ_PROPERTY (Workbooks, 'Open', args);

    Client_OLE2.destroy_arglist (args);

    worksheets: = Client_OLE2. GET_OBJ_PROPERTY (workbook, 'Worksheets');

    -Get the number of spreadsheets

    -- ------------------------

    num_wrkshts: = Client_OLE2. GET_NUM_PROPERTY (worksheets, 'Count');

    worksheet: = Client_OLE2. GET_OBJ_PROPERTY (application, 'activesheet');

    -Go to the first record

    go_block ('EXCEL_EXPORT_TABLE');

    premier_enregistrement;

    loop

    If: system.record_status <>'NEW' then

    create_record;

    end if;

    When the exit NEM;

    for 1.15 k loop - 15 frames / record - hard-code the length of the column

    args: = Client_OLE2.create_arglist;

    Client_OLE2.add_arg (args, j);

    Client_OLE2.add_arg (args, k);

    cell: = Client_OLE2.get_obj_property (spreadsheet calculation, 'Cells', args);

    Client_OLE2.destroy_arglist (args);

    If Client_OLE2.get_char_property (cell, 'Value') = 'null' then

    cell_value: = ";

    on the other

    cell_value: = nvl (Client_OLE2.get_char_property (cell, 'Value'), 0);

    end if;

    If upper (cell_value) = 'NEM' then - the loop runs until "NEM" are judged.

    Nem: = true;

    Message ('end of data');

    "exit";

    end if;

    Copy (cell_value, name_in ('system.cursor_item'));

    next_item;


    end loop; -for

    j: = j + 1;

    end loop;-main loop

    premier_enregistrement;

    -Release the handles object Client_OLE2

    IF (cell IS NOT NULL) THEN

    Client_OLE2.release_obj (cell);

    END IF;

    IF (spreadsheet IS NOT NULL) THEN

    Client_OLE2.release_obj (Worksheet);

    END IF;

    IF (spreadsheets IS NOT NULL) THEN

    Client_OLE2.release_obj (Worksheets);

    END IF;

    IF (worksheet2 IS NOT NULL) THEN

    Client_OLE2.release_obj (worksheet2);

    END IF;

    IF (workbook IS NOT NULL) THEN

    Client_OLE2.release_obj (Workbook);

    END IF;

    IF (workbooks IS NOT NULL) THEN

    Client_OLE2.release_obj (Workbooks);

    END IF;

    Client_OLE2. Invoke (application, 'Quit');

    Client_OLE2.release_obj (application);

    ON THE OTHER

    Message ("no file selected.'");

    message(' ');

    RAISE Form_Trigger_Failure;

    END IF;

    END;

    Please think it has no integrated to find no records and columns in excel file using oracle forms.

    Thank you and best regards,

    JaKes

    This change according to excel data file.

    for example, we also use this logic. because the first column in excel file still does not empty. It should be full.

    If any column of a raw material can be empty, one with just my solution can be

    v_all_column_str: = col_A_Value | col_B_Value | col_C_Value | col_D_Value |... col_n_value;

    if v_all_column_str is null, then--> you can tell, all of the columns of this vintage in excellent file is empty

  • FRM - 40603:Records is no longer reserved for the update. Query for changes

    Hi I have a form that has been developing 6i and upgraded to 11g form work well in 6i, but when I try to do the same function in 11g get this error

    FRM - 40603:Records is no longer reserved for the update. Query for changes
    When I commit this execute_query (for_update); It is the form to clear values when it loads, the error comes when I try to delete

    How can I do this

    Action: If you want to change the block, you will need to re - interview.

    Captureerror3.PNG

    I use When-Timer-Expired (WTE) trigger

    You have a 'relationship' defined between the blocks of your master and detail? If so, simply update your master block and the block of details will automatically be re-interviewed. If you cannot use a relationship, then you can use can create a timer in the trigger that updates the database, then in the trigger When-Timer-Expired (WTE) you can go to the retail block and run a query. For example: / * the sample on change trigger * /.

    DECLARE
      timer_id  TIMER;
    BEGIN
    ....your code here that performs the update....
      /* Now create an instance of a timer */
      timer_id := Create_Timer ('upd_detail',1,NO_REPEAT);
    END;/* Sample Form Level When-Timer-Expired trigger */
    DECLARE
      timer_id  TIMER;
    BEGIN
      -- Find the timer first
      timer_id := FIND_TIMER('upd_detail');
      IF NOT ID_NULL(timer_id) THEN
          GO_BLOCK('DETAIL_BLOCK');
          Execute_Query;
      END IF;
    END;
    
  • You want to refresh messge - Oracle EBS

    Hi friends,

    Kindly help me on this. I want to level header to level changes line cascading. Forms of Oracle EBS R12.

    RDBMS: 11.2.0.3.0

    Oracle Applications: 12.1.3

    I did the code changes. But the changes are not thinking at the level of the line. during the review of the code - someone who suggests.

    make a pop as

    You want to update the records?

    YES NO

    If you click Yes - reports should update.

    can someone help me how to do such a pop up and clicking Yes-how do to refresh.

    Let me know if you have any questions.

    Thank you...

    For this error, I think that go_block is not allowed on your action.

    First of all you check your code - go one block then try to execute the query

    you need to debug your code

  • Error you can not change

    Hi gurus

    I am trying to create a box and if the user select any associated element must be the verification mark and uncheck the box if I have her clear so all related items should be...

    So far I have used the loop to do this task, but every time that I supported then I get a pop up that you can not change this...

    So far, I did the coding to check alone...

    Code

    Declare

    REC pls_integer: = Get_Block_Property ("SMC", CURRENT_RECORD);

    Begin

    Go_Block ('FORM_TABS');

    Premier_enregistrement;

    Loop

    : FORM_TABS.select_ind: =: MSC. CHK_ALL;

    When the output: SYSTEM. LAST_RECORD = "TRUE";

    Next_Record;

    End loop;

    Go_Record (CRE);

    End;

    End;

    I also enclose for your reference image. Thanks in advance

    Concerning

    Muzz

    Check: FORM_TABS.select_ind update_allowed property is YES/NO, if yes, value.

  • Where clause in the "default_where" of get_block_property is not cancelled...

    Hello

    I developed a form with two blocks.

    The first - block of non - database contains the criteria.

    Database of the other - block-displays the records according to the inserted.

    Also, there is a button that executes the query criteria.

    The code of the BUTTON WHEN PRESSED is as follows:

    declare

    v_where varchar2 (3000);

    Start

    v_where: = null;

    go_block ('EKKREMOTHTES_AIT_TSG');

    clear_block (no_validate);

    v_where: = get_block_property ('EKKREMOTHTES_AIT_TSG', default_where);

    If: blk_criteria.site_id is not null then

    v_where: = v_where |' and site_id = "'|: blk_criteria.site_id | ''';

    end if;

    If: blk_criteria.yphr_klimakio is not null then

    v_where: = v_where |' and yphr_klimakio = "'|: blk_criteria.yphr_klimakio | ''';

    end if;

    If: blk_criteria.send_date_from is not null and: blk_criteria.send_date_to is not null then

    v_where: = v_where |' and send_date between to_date('''|| to_char(:blk_criteria.send_date_from,'dd/mm/yyyy')||''',''dd/mm/yyyy'') and

    to_date('''|| to_char(:blk_criteria.send_date_to,'dd/mm/yyyy') | " (', "dd/mm/yyyy)";

    end if;

    If: blk_criteria.eq_group1 is not null then

    v_where: = v_where |' and eq_group1 = "' | : blk_criteria.eq_group1 | " ' ;

    end if;

    If: blk_criteria.eq_type1 is not null then

    v_where: = v_where |' and eq_type1 = "' | : blk_criteria.eq_type1 | " ' ;

    end if;

    If: blk_criteria.eq_group2 is not null then

    v_where: = v_where |' and eq_group2 = "' | : blk_criteria.eq_group2 | " ' ;

    end if;

    If: blk_criteria.eq_type2 is not null then

    v_where: = v_where |' and eq_type2 = "' | : blk_criteria.eq_type2 | " ' ;

    end if;

    blk_def_where ('EKKREMOTHTES_AIT_TSG', v_where);                                    / * a form routine that makes the set_block_property(<block>,default_where) * /.

    do_key ('execute_query');

    end;

    The above code works when the user inserts the criteria for the first time. Later when the user deletes certain criteria - clear criteria in the block of criteria-

    and he pushed the button of the query results are exactly the same...

    After have debugged the problem, clause v_where is not nullied (do not get the value zero) in order to get the new criteria.

    Can you identify the error?

    Note: I use Oracle Forms 10 g Db 11 g v.2

    Thank you very much

    SIM

    SIM,

    The procedure "blk_def_where" sets the block where clause by using the DEFAULT_WHERE or the ONETIME_WHERE constanct?  Gets it to the user that the same results as the DEFAULT_WHERE sets the property WHERE permanently so the second time through, the 'v_where' is NOT null.  Check your BLK_DEF_WHERE procedure and if it does not use the ONETIME_WHERE constanct, change isn't.  The alternative would be to put DEFAULT_WHERE = NULL after the call to the built-in EXECUTE_QUERY.

    Craig...

  • Data of appeals with a cursor in Forms 6i

    Hello world

    I have 2 data block in my block of data and database, I added a new issue that is not an element of database operations and create a trigger when-validate-point and the trigger, I set a command to go to a program with the following slider unit:

    My problem is that the cursor brings data, but only on a single line and I have to re - enter the value again to display the next line.

    Can anyone, please help?

    Begin

    Premier_enregistrement;

    Loop

    For C in

    (Select Field1, Field2, field3

    From my_table

    where field1 =: datablock_1.field1 and

    Orden =: datablock_1.orden

    order of Field2)

    Loop

    : datablock_2.field1: = c.field1;

    : datablock_2.field2: = c.field2;

    : datablock_2.field3: = c.field3;

    Exit;

    End loop;

    When the output: System.Last_Record = "TRUE";

    Next_Record;

    End loop;

    Premier_enregistrement;

    End;

    This should not work at all - I'm surprised that you said it's pulling on a single line of data.

    The WHEN-VALIDATE-ITEM trigger does not procedures restricted such as premier_enregistrement, NEXT_RECORD, etc... I think so it would throw an exception as soon as this logic is executed.

    What exactly are you trying to do?

    Are you trying to fill in the data in your second block of data based on data in the first block?  If so, the user presses a button to insert this magic?  If they did, then I put the logic in this button because a trigger BUTTON WHEN PRESSED will allow restricted procedures.  You must also add a GO_BLOCK ('DATABLOCK_2'); between BEGIN and premier_enregistrement; just to make sure that you are a loop in the correct block.  I feel that you are always sitting in DATABLOCK_1 which don't have record 1.

    You can also delete the END_LOOP LOOP and EXIT, since nearly three: datablock_2 statements because they are unnecessary.

Maybe you are looking for