GET_ITEM_PROPERTY in QOTLNDET_LINES block

Hi,
My requirement is like this, In QOTHDDET form, QOTLNDET_LINES block, whenever i am changing the agreement_name, i want to add a condition in my program to check whether the value got changed or not. for that i tried a condition like GET_ITEM_PROPERTY(FIND_ITEM('QOTLNDET_LINES.AGREEMENT_NAME'),DATABASE_VALUE) to check the database value, but whenever we change the lov its getting the latest lov instead of getting from the database. i tried with system.form_status to check whether it is in 'QUERY' or 'CHANGED' mode. but it is not working properly, even sometimes if i change the lov the record status is in 'QUERY' mode. i can't figure out why it is happening like this. can anybody suggest a workaround for this, as this is a very urgent requirement. please update me on this.
Thanks,
ramakrishnan

I tried a simple EMP test case and read the HIREDATE and this come out ok even with the NLS_DATE_FORMAT set ok (mon-YYYY-dd)
Can you try in a simple case and see if this reproduces?
I would also suggest that since this looks like a specific Forms question, you post to the Forms forum where there may be more people
who can help
Regards
Grant Ronald
Forms Product Management

Similar Messages

  • How to count number of items present in a data block

    hi all,
    how to count how many items present in a particular data block in oracle forms 10g.
    whether it is a text_item or display_item or list_item etc is there any method to do this.
    please reply....

    hi all,
    i have written this when-button pressed but the problem is how to get the next item name in the block
    DECLARE
         V_COUNT NUMBER:=0;
         V_FIRSTITEM VARCHAR2(100):='';
    BEGIN
         GO_BLOCK('BLOCK_ITEMCOUNT');
         V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', FIRST_ITEM);
         LOOP
              V_COUNT := V_COUNT + 1;
              EXIT WHEN GET_ITEM_PROPERTY(V_FIRSTITEM, NEXTITEM) IS NULL;
              --V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', NEXTITEM);
              --V_COUNT := V_COUNT + 1;
         END LOOP;
    END;

  • How to find the name of the block and yours items at runtime

    Hi, everybody.
    I wonder if there is any way to list the name of a block and their respective items that forms at run time. for example, using a loop in wnfi.
    Since already thank you.
    Sorry for my bad English.

    Hi,
    Try this code. It will travel through all block's items.
    DECLARE
         Str_First_Block      VARCHAR2(100) := NULL;
         Str_First_Item          VARCHAR2(100) := NULL;
         Str_Current_Block VARCHAR2(100) := NULL;
         Str_Current_Item      VARCHAR2(100) := NULL;
    BEGIN
         Str_First_Block := :SYSTEM.CURRENT_BLOCK;
         LOOP
              IF Str_Current_Block IS NULL THEN
                   Str_Current_Block := Str_First_Block;
              END IF;
              Str_First_Item := GET_BLOCK_PROPERTY(Str_Current_Block, FIRST_ITEM);
              LOOP
                   IF Str_Current_Item IS NULL THEN
                        Str_Current_Item := Str_First_Item;
                   END IF;
                   MESSAGE('Item - ' || Str_Current_Block || '.' || Str_Current_Item);
                   PAUSE;
                   Str_Current_Item := GET_ITEM_PROPERTY(Str_Current_Block || '.' || Str_Current_Item, NEXTITEM);
                   EXIT WHEN Str_Current_Item IS NULL;
              END LOOP;
              Str_Current_Block := GET_BLOCK_PROPERTY(Str_Current_Block, NEXTBLOCK);
              EXIT WHEN Str_Current_Block IS NULL;
         END LOOP;
    END;Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • How to display LOV on web in ENTER-QUERY mode with form or block query only.

    Hello all
    How can I display lov automatic on the web in from enter-query
    mode in form or block query only mode.
    thankx

    If I understand correctly your explanation, your called form
    fails to activate the LOV in enter-query mode when it is deployed
    and test on the browser.
    So lets proceeed like this, to make it work in all environments,
    let us programetically activate the LOV.
    HOW?
    In the called form, write in the WHEN-NEW-ITEM-INSTANCE TRIGGER
    at block level (if have more than one LOV)
    IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
    IF get_item_property(:system.cursor_item,lov_name) IN ('YOUR
    LOV1', 'LOV2' etc) THEN
    IF SHOW_LOV(get_item_property(:system.cursor_item,lov_name))
    THEN
    NULL;
    END IF;
    END IF;
    END IF;
    The above code maybe tweak to suite your need and condition.
    This way, we explicitly make the LOV appear in ENTER-QUERY mode
    whenever the user clicks on an item with an attached LOV.
    Hope this helps.
    Mohammed R.Qurashi

  • Export data from block to excel.

    Hi
    Does anybody know how I can export data from oracle forms to an excel worksheet. I need to provide a direct interface for a user where he fetches the data into the block and by just click a button the data from the block should go to an excel sheet.
    Thanks in advance
    -Samsam

    Something along the following lines should help you in you are Client/Server. If you're on the Web then make sure you have WebUtil set up and add "CLIENT_" to all the OLE2 calls.
    PROCEDURE P_EXCEL IS
         application ole2.Obj_Type;
         workbooks ole2.Obj_Type;
         workbook ole2.Obj_Type;
         worksheets ole2.Obj_Type;
         worksheet ole2.Obj_Type;
         args ole2.List_Type;
         cell ole2.Obj_Type;
         j INTEGER;
         k INTEGER;
         file_name_cl VARCHAR2(32767);
         item_prompt VARCHAR2(32767);
    user_cancel EXCEPTION;
    BEGIN
    -- open the java save file dialogue box
    file_name_cl := GET_FILE_NAME('H:\', 'file_name.xls', 'XLS Files (*.xls)|*.xls|', NULL, SAVE_FILE, TRUE);
    file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl));
    IF file_name_cl IS NULL THEN
    RAISE user_cancel;
    END IF;
    application := ole2.create_obj('Excel.Application');
    workbooks := ole2.Get_Obj_Property(application, 'Workbooks');
    workbook := ole2.Invoke_Obj(workbooks, 'Add');
    worksheets := ole2.Get_Obj_Property(workbook, 'Worksheets');
    worksheet := ole2.Invoke_Obj(worksheets, 'Add');
    go_block('EXPORT_BLOCK');
    first_record;
    j:=1; /* Represents row number */
    k:=1; /* Represemts column number */
    /* Add the column headings using item prompts */
         FOR k IN 1..10 /* Block has 10 visible columns */
    LOOP
    item_prompt := get_item_property(:SYSTEM.CURRENT_BLOCK||'.'||:SYSTEM.CURRENT_ITEM, prompt_text);
    args:=ole2.create_arglist;
    ole2.add_arg(args, j);
    ole2.add_arg(args, k);
    cell:=ole2.get_obj_property(worksheet, 'Cells', args);
    ole2.destroy_arglist(args);
    ole2.set_property(cell, 'Value', item_prompt);
    ole2.release_obj(cell);
    next_item;
    END LOOP;
    j:=j+1; /* Add to rowcount so that data won't overwrite column headings! */
    LOOP
    /* Add in all the data */
    FOR k IN 1..10 /* Block has 10 visible columns */
    LOOP
    IF NOT name_in(:system.cursor_item) IS NULL THEN
    args:=ole2.create_arglist;
    ole2.add_arg(args, j);
    ole2.add_arg(args, k);
    cell:=ole2.get_obj_property(worksheet, 'Cells', args);
    ole2.destroy_arglist(args);
    ole2.set_property(cell, 'Value', name_in(:system.cursor_item));
    ole2.release_obj(cell);
    END IF;
    next_item;
    END LOOP;
    j:=j+1;
    IF :system.last_record = 'TRUE' THEN
         exit;
    ELSE
         next_record;
    END IF;
    END LOOP;
         ole2.Release_Obj(worksheet);
         ole2.Release_Obj(worksheets);
         /* Save the Excel file created */
         args := ole2.Create_Arglist;
         ole2.Add_Arg(args, file_name_cl);
         ole2.Invoke(workbook, 'SaveAs', args);
         ole2.Destroy_Arglist(args);
         /* release workbook */
         ole2.Release_Obj(workbook);
         ole2.Release_Obj(workbooks);
         /* Release application */
         ole2.Invoke(application, 'Quit');
         ole2.Release_Obj(application);
    EXCEPTION
    WHEN user_cancel THEN
         RAISE;
    END;

  • How to compare, current value in :block.text_item with the database value

    Hi
    Could you please tell me
    How to compare the current value in :block.text_item with the corresponding database column value.
    I am using forms 10g
    There is block and there is an text Item in that block.
    When I run the form and query the block (tabular), the :block.text_item shows me, whatever value there in the database.
    Now I add some value in the :block.text_item to the existing value.
    now
    the :block.text_item contains old+ new added value
    whereas
    the database table contains 'old' value
    Now on a button click , I want to find out what is the value that I have added
    Could you please tell me, is it possible without writing a select query?

    Hello,
    Now on a button click , I want to find out what is the value that I have addedSo you mean always user will add value in the existing value. Because this way will fail in one case. Let say
    Value in Database is = ABCD
    User opened the form and he removed the D and write E and now value is ABCE and length is still same 4. So, there is no addition.
    Anyway you can know the database value at runtime there is one property for item called DATABASE_VALUE. It gives the value which is in database while you are running the form before save. and you can use like this..
    Trigger = WHEN-MOUSE-DOUBLE-CLICK on item level
    DECLARE
      vItemValue DATATYPE; -- Set the data type according to your desired field.
      vValueAdded DATATYPE; -- Set the data type according to your desired field.
    BEGIN
      vItemValue:=GET_ITEM_PROPERTY('ITEM_NAME',DATABASE_VALUE);  -- It will return you the database value in vItemValue variable.
      IF LENGTH(vItemValue)>LENGTH(:FORM_ITEM_NAME) THEN  -- It mean something change or added
        vValueAdded:=SUBSTR(:FORM_ITEM_NAME,LENGTH(vItemValue)+1);
        MESSAGE('Added value is : '||vValueAdded);  -- It will show you the added value.
      END IF;
      -- now suppose you want to show the old and new value in message not the added one
      -- Then no need of IF condition. You can just use message like this
      -- And i would prefer to use like this way
      MESSAGE('Old Value : '||vItemValue||'  New Value - '||:FORM_ITEM_NAME);
      MESSAGE('Old Value : '||vItemValue||'  New Value - '||:FORM_ITEM_NAME);
    END;Hope it is clear.
    -Ammad

  • Form fields just a block of black print

    I am completing a form online but when printing the fields that has no text in them print out in solid black blocks of ink. Why is this happening?

    HI,
    some tips:
    "I'll need a list of fields within the block which the cursor is in"
    More generally, you can get the first block of your form using... "GET_FORM_PROPERTY(<your_form>,first_block)"
    To get the first the first item of the specified block....
    "GET_BLOCK_PROPERTY(block_name,first_item)"
    then loop through all items of your block
    "GET_ITEM_PROPERTY(item_name,nextitem)"
    and if you want to exclude some item types such as buttons....
    if GET_ITEM_PROPERTY(item_name,item_type)<>'BUTTON'
    Greetings,
    Sim

  • Performance question on looping thrue blocks and items (forms 10.1.2.3)

    Hi all,
    I'm back again in Forms forum : ) !!! and I'm working on a new and very interesting project
    version used : Forms [32 bits] Version 10.1.2.3.0 (Production)
    A little question for gurus :
    On former projects I used to call loops on blocks and item like shown below to do various things such as displaying buttons or showing canvas or different VA depending on the user or scenarios .
    PROCEDURE FRM_BLK_ITM_LOOP IS
    v_curblk varchar2(90); -- bloc courant
    v_curitm varchar2(90); -- item courant
    BEGIN
      v_curblk := get_form_property(:SYSTEM.CURRENT_FORM,first_block); -- on récupère le 1er block de la form
      LOOP
      v_curitm := v_curblk||'.'||get_block_property(v_curblk,first_item); -- on récupère le 1er item du block
        WHILE v_curitm != v_curblk||'.'||get_block_property(v_curblk,last_item)
         LOOP -- tant que l'item n'est pas le dernier du block on loop
            v_curitm :=  v_curblk||'.'||get_item_property(v_curitm,nextitem); -- on récupère l item suivant
            if get_item_property(v_curitm,<some property>) = 'TRUE' then
              --- I can do something.... or adding more conditions if then etc...
            end if;
        END LOOP;
      EXIT WHEN v_curblk = get_form_property(:SYSTEM.CURRENT_FORM,last_block); -- on sort losrqu on arrive au dernier block
      v_curblk := get_block_property(v_curblk, nextblock); -- on passe au block suivant
      END LOOP;
    END;In my current project we work on quite huge forms which can have a consequent number of blocks and items.
    And we must be very careful regarding performance issues as these forms are accessed via LAN and WAN.
    So my question :
    This method seems to be quite efficient as it goes thrue blocks and items sequences as they are defined in the builder comparing to go_block -> go_item ->do_something which can easily turn into nightmare-programming.
    But I don't really know about network roundtrips with this kind of method.
    Is everything done in the app server and then fetched to the client?
    What triggers block-level and item-level can be fired during the execution of the loop ? and so one...
    Thanks in advance for your advices on this matter.
    Jean-Yves

    Hmmm, I have to say I never bothered if Forms is in Socket mode or not; I enabled the network statistics, counted the roundtrips and looked for ways to get them lower (my old friend wireshark did also a good job regarding this) ;). But regarding the note Forms 6i uses Socket Connections by default, this might apply to 10g too (or the enhancement request was approved, who knows).
    Frankly I am not entirely sure what Socket Mode means; I guess it's the mode the forms applet talks to the forms runtime; wheter it's stateful (via Sockets) or stateless (via HTTP / HTTPS) but this is just a wild guess, and I can't find informations on it quickly. I also enabled networkStats on my Developer Suite only, so I cannot tell if you can enable them on a full-fledged Application Server.
    Anyway; as said I just counted the roundtrips and looked where I can avoid them when I made our application ready for WAN.
    Another useful tool was Shunra VE Desktop which I used to simulate low bandwith networks with high latencys; I installed it on a virtual XP, started the application and tested how the Application performs. If something looked odd, I looked behind the scenes, built a little testform basing on the code behind and tried out various things; very often you can take advantage of the event bundling forms seems to make when you use several set_xyz calls as Francois also noted; e.g.
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    vRet := get_custom_property('bean_item', 1, 'PROPERTY);most certainly will cause just 1 roundtrip; but if you use get_custom_property in the middle of the set_custom_property calls you will encounter 2 roundtrips as forms needs to synchronize (you get a value from the bean so the forms runtime needs a response) with the forms applet whereas set_custom_property is a one-way-street which can be fired off simultaneous. The same applies to fbean.invoke and fbean.invoke_bool, fbean.invoke_char and the like. Of course if you are using more then one get_custom_property in this case the roundtrips will increase accordingly.
    If you want to make use of event bundling make sure you fire off as much set_xyz as you can before forcing forms to synchronize (e.g. with get_xyz, or synchronize, create_timer,...)
    cheers

  • Enabling and disabling the button in the multi record block

    hi all,
    i am using
    Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i have a multi record block each block contains a button(button is to approve the record in terms of changing the status)
    i have the items like date,remarks and button
    the button should be enabled if the remarks is not null otherwise it should be disabled.
    for this in pre-record trigger i have written
    if :record is null then
       set_item_property('button',enabled,property_false);
    else
          set_item_property('button',enabled,property_false);
    end if;what problem is enable and disable is impacting on all the buttons in the block. in other words if first record's remarks is null then all the records button is disabled. if first record's remarks column is not null then all the records of the button column is enabled.
    i have to make enable and disable the button for the corresponding record.that means if first record's remarks column is not null then only first records button should be enabled others should be disabled.
    Thanks..

    You need to set the No. of items displayed to 1 as Ammad had said, additionally you can set the X and Y Position (Just Y will do and having fixed X) of the button depending upon the current record.
    can u explain this part alone bit more (setting the position of x and y)You need to calculate the variable Y_POS depending upon the current position of the cursor that is the current record.
    You can find the current record Y_POS using combination of
    V_CURRENT_RECORD := :SYSTEM.CURSOR_RECORD;
    V_TOP_RECORD := GET_BLOCK_PROPERTY ('BLOCK_NAME', TOP_RECORD);
    V_ITEM_Y_POS := GET_ITEM_PROPERTY ('ITEM_NAME', Y_POS);
    -- Also needs to add the Y_POS of the relative other items in the muti-record block
    V_HEIGHT := GET_ITEM_PROPERTY ('BUTTON_NAME', HEIGHT);
    -- Note :- TOP_RECORD  Returns the record number of the topmost visible record in the given block.
    V_Y_POS := V_ITEM_Y_POS + ((V_CURRENT_RECORD - V_TOP_RECORD) * V_HEIGHT);
    -- You will need to add Distance between Items in records if anyThen you can Set the current Y_POS of the button.
    SET_ITEM_PROPERTY ('BUTTON_NAME', Y_POS, V_Y_POS);
    [/code[
    Hope this helps
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Feb 24, 2011 4:58 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Dynamic visual attributes/multi-row blocks

    We're using Headstart, Des2k V6.0.3.8. If you set preference CURREC = multi record block, you get the current record visual attribute (cg$current_record) attached to all displayed items in multi-row blocks. From the Headstart object library, these items also inherit a visual attribute of qms$item_font.
    At runtime, Headstart code is invoked from the block's post-query trigger - this code dynamically assigns a readonly visual attribute to all items that are insert only, or the qms$item_font va to items that are update only. (Incidentally, it seems a bit strange that no va is assigned to items that are neither insertable nor updateable).
    Assigning the va in this way seems to override the current record va for these items, which looks a little strange at runtime. I would prefer to see the current record va overriding the readonly/item_font va. In a future Headstart release, it would be nice if this functionality was configurable, but in the meantime can you suggest the easiest way of making this change to the Headstart code? I think it will be necessary to specifically set the va to stnd/readonly/current record in the when-new-record-instance trigger, & reset it on the post-record trigger. Once va's are being set dynamically, the current record attribute is pretty useless in multi-row blocks.
    Incidentally - we've also changed the behaviour of va's in query mode processing. We wanted the query mode va to override the current record va; qms$record.highlight_items wasn't setting the selected va unless items have a current record attribute of DEFAULT. We wanted query mode to look the same regardless how many rows are in the block; it also looked a little odd in a multi-row block with overflow items, where the overflow items were being highlighted but the rest of the block wasn't. It would be nice if this was also a configurable option.

    Cheryl,
    Good point! It does look a bit odd. I'll take this into consideration for HSD6i.
    To customize your app, try the following.
    Copy qms$event_data_block from qmsevh50.pll to your application library.
    Copy procedure set_nav_items_exg_record from the qms$record package in qmslib50.pll to your application library -AND GIVE IT A NEW NAME- like set_nav_items_custom.
    Change your copy of qms$event_data_block to call this new procedure in the post-query event.
    Modify set_nav_items_custom as follows.
    ============================================
    procedure set_nav_items_custom
    ( p_block in varchar2
    , p_recno in number default current_record
    is
    l_rg_id recordgroup;
    l_rgc1_id groupcolumn;
    l_rgc2_id groupcolumn;
    rg_rows number;
    l_item_flag varchar2(1);
    l_item_name varchar2(100);
    l_first_io_item varchar2(100);
    begin
    qms$block.init_block_rg
    ( p_block,false,l_rg_id,l_rgc1_id,
    l_rgc2_id, rg_rows);
    if id_null(l_rg_id)
    then
    -- no insert-only or update only items
    -- in block
    return;
    end if;
    for j in 1..rg_rows loop
    l_item_name := get_group_char_cell
    (l_rgc1_id, j );
    l_item_flag := get_group_char_cell
    (l_rgc2_id, j );
    if l_item_flag = 'I'
    then
    if l_first_io_item is null
    then
    l_first_io_item := l_item_name;
    end if;
    -- Item is insert-only, update not
    -- allowed
    -- Change background color to
    -- read-only.
    set_item_instance_property
    ( l_item_name,p_recno,navigable
    , property_false);
    /* customization */
    if get_item_property(l_item_name
    , current_record_attribute) is null
    or p_recno <> :system.cursor_record
    then
    /* end customization */
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$user_prefs.get_va_readonly_item);
    /* customization */
    end if;
    /* end customization */
    else
    -- Item is update-only, insert not
    -- allowed */
    set_item_instance_property
    (l_item_name,p_recno
    ,navigable,property_true);
    /* customization */
    if get_item_property(l_item_name
    ,current_record_attribute) is null
    or p_recno <> :system.cursor_record
    then
    /* end customization */
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$config.get_stnd_font);
    /* customization */
    end if;
    /* end customization */
    end if;
    end loop;
    -- 18-1-1999: If block only contains no
    -- updatebale items, there are navigable
    -- items left.
    -- If this is the case make first
    -- insert-only item navigable again.
    if get_block_property(p_block,enterable) =
    'FALSE'
    then
    if l_first_io_item is not null
    then
    set_item_instance_property
    (l_first_io_item,p_recno
    ,navigable,property_true);
    end if;
    end if;
    exception
    when form_trigger_failure then raise;
    when others then
    qms$errors.unhandled_exception
    ('qms$block.set_mav_items_custom');
    end set_nav_items_custom;
    ============================================
    Next, as you suggested, add WHEN-NEW-RECORD-INSTANCE and POST-RECORD triggers to handle movement from one record to the next.
    WHEN-NEW-RECORD-INSTANCE
    ============================================
    procedure set_nav_items_wnri
    ( p_block in varchar2
    , p_recno in number default current_record
    is
    l_rg_id recordgroup;
    l_rgc1_id groupcolumn;
    l_rgc2_id groupcolumn;
    rg_rows number;
    l_item_flag varchar2(1);
    l_item_name varchar2(100);
    begin
    qms$block.init_block_rg
    ( p_block,false,l_rg_id,l_rgc1_id,
    l_rgc2_id, rg_rows);
    if id_null(l_rg_id)
    then
    -- no insert-only or update only items
    -- in block
    return;
    end if;
    for j in 1..rg_rows loop
    l_item_name := get_group_char_cell
    (l_rgc1_id, j );
    l_item_flag := get_group_char_cell
    (l_rgc2_id, j );
    if l_item_flag = 'I'
    then
    -- Item is insert-only, update not
    -- allowed
    -- Change background color to
    -- read-only.
    if get_item_property(l_item_name
    , current_record_attribute) is null
    or p_recno <> :system.cursor_record
    then
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$user_prefs.get_va_readonly_item);
    else
    set_item_instance_property
    (l_item_name,p_recn o
    ,visual_attribute
    ,get_item_property(l_item_name
    , current_record_attribute));
    end if;
    else
    -- Item is update-only, insert not
    -- allowed */
    if get_item_property(l_item_name
    ,current_record_attribute) is null
    or p_recno <> :system.cursor_record
    then
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$config.get_stnd_font);
    else
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,get_item_property(l_item_name
    , current_record_attribute));
    end if;
    end if;
    end loop;
    exception
    when form_trigger_failure then raise;
    when others then
    qms$errors.unhandled_exception
    ('qms$block.set_mav_items_wnri');
    end set_nav_items_wnri;
    ============================================
    For the POST-RECORD trigger, you will have to modify your object library since this trigger is not included by default. Add the trigger to the object library CGSO$BLOCK_MR.
    Then add the POST-RECORD event to your copy of qms$event_data_block.
    Finally, add a procedure for the POST-RECORD trigger.
    ============================================
    procedure set_nav_items_pr
    (p_block in varchar2
    ,p_recno in number default current_record
    is
    l_rg_id recordgroup;
    l_rgc1_id groupcolumn;
    l_rgc2_id groupcolumn;
    rg_rows number;
    l_item_flag varchar2(1);
    l_item_name varchar2(100);
    l_first_io_item varchar2(100);
    begin
    qms$block.init_block_rg
    ( p_block,false,l_rg_id,l_rgc1_id,
    l_rgc2_id, rg_rows);
    if id_null(l_rg_id)
    then
    -- no insert-only or update only items
    -- in block
    return;
    end if;
    for j in 1..rg_rows loop
    l_item_name := get_group_char_cell
    (l_rgc1_id, j );
    l_item_flag := get_group_char_cell
    (l_rgc2_id, j );
    if l_item_flag = 'I'
    then
    -- Item is insert-only, update not
    -- allowed
    -- Change background color to
    -- read-only.
    if l_item_flag = 'I'
    then
    -- Item is insert-only, update not
    -- allowed
    -- Change background color to
    -- read-only.
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$user_prefs.get_va_readonly_item);
    else
    -- Item is update-only, insert not
    -- allowed
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$config.get_stnd_font);
    end if;
    end loop;
    exception
    when form_trigger_failure then raise;
    when others then
    qms$errors.unhandled_exception
    ('qms$block.set_mav_items_pr');
    end set_nav_items_pr;
    ============================================
    Regards,
    Lauri

  • How to set runtime block and its items navigation

    this is my procedure to set a navigation in a block. but with this i m unable to how to navigate to second block.
    first block name is TRANS1
    and second block name TRANS2
    i need this navigation procedure because some items are getting invisible at the run time.i m using ORACLE 8i and FORM 6i.
    PROCEDURE NAVIGATION_SEQUENCE IS
         V_LOOP NUMBER;
         V_PREITEM VARCHAR2(100);
         V_MAXLOOP1 NUMBER;
         V_MAXLOOP2 NUMBER;
    BEGIN
    NULL;
         SET_ITEM_PROPERTY('TRANS1.T_DATE',NEXT_NAVIGATION_ITEM,'TRANS1.T_VRDATE');
         IF :PARAMETER.F$BOOKTYPE = 'DB' THEN
         SET_ITEM_PROPERTY('TRANS1.T_VRDATE',NEXT_NAVIGATION_ITEM,'TRANS1.T_VRNO');
         SET_ITEM_PROPERTY('TRANS1.T_VRNO',NEXT_NAVIGATION_ITEM,'TRANS1.T_MAID');
         ELSE
         SET_ITEM_PROPERTY('TRANS1.T_VRDATE',NEXT_NAVIGATION_ITEM,'TRANS1.T_MAID');
         END IF;
         SET_ITEM_PROPERTY('TRANS1.T_MAID',NEXT_NAVIGATION_ITEM,'TRANS1.T_AGID');
         SET_ITEM_PROPERTY('TRANS1.T_AGID',NEXT_NAVIGATION_ITEM,'TRANS1.T_DUEDAYS');
         SET_ITEM_PROPERTY('TRANS1.T_DUEDAYS',NEXT_NAVIGATION_ITEM,'TRANS1.T_DUEDATE');
         V_PREITEM := 'TRANS1.T_DUEDAYS';
         IF GET_ITEM_PROPERTY('TRANS1.T_DF1',VISIBLE) = 'TRUE' THEN
         SET_ITEM_PROPERTY('TRANS1.T_DF1',NAVIGABLE,PROPERTY_TRUE);
         SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF1');
         V_PREITEM := 'TRANS1.T_DF1';
         END IF;     
         IF GET_ITEM_PROPERTY('TRANS1.T_DF2',VISIBLE) = 'TRUE' THEN
         SET_ITEM_PROPERTY('TRANS1.T_DF2',NAVIGABLE,PROPERTY_TRUE);
         SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF2');
         V_PREITEM := 'TRANS1.T_DF2';
         END IF;     
         IF GET_ITEM_PROPERTY('TRANS1.T_DF3',VISIBLE) = 'TRUE' THEN
         SET_ITEM_PROPERTY('TRANS1.T_DF3',NAVIGABLE,PROPERTY_TRUE);
         SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF3');
         V_PREITEM := 'TRANS1.T_DF3';
         END IF;     
         IF GET_ITEM_PROPERTY('TRANS1.T_DF4',VISIBLE) = 'TRUE' THEN
         SET_ITEM_PROPERTY('TRANS1.T_DF4',NAVIGABLE,PROPERTY_TRUE);
         SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF4');
         V_PREITEM := 'TRANS1.T_DF4';
         END IF;     
         IF GET_ITEM_PROPERTY('TRANS1.T_DF5',VISIBLE) = 'TRUE' THEN
         SET_ITEM_PROPERTY('TRANS1.T_DF5',NAVIGABLE,PROPERTY_TRUE);
         SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF5');
         V_PREITEM := 'TRANS1.T_DF5';
         END IF;     
         IF GET_ITEM_PROPERTY('TRANS1.T_DF6',VISIBLE) = 'TRUE' THEN
         SET_ITEM_PROPERTY('TRANS1.T_DF6',NAVIGABLE,PROPERTY_TRUE);
         SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF6');
         V_PREITEM := 'TRANS1.T_DF6';
         END IF;     
    end NAVIGATION_SEQUENCE;

    hi Volberg
    thanks for your reply
    dear friend in my form, some of the block item i have to disable(make invisible).
    this is my requirement.
    V_PREITEM is a variable which contain the name of last item, which i already set in navigation.
    look at all 'IF' condition.
    1st V_PREITEM := 'TRANS1.T_DF1';
    2nd V_PREITEM := 'TRANS1.T_DF2';
    in other words V_PREITEM variable having last item name.
    IF GET_ITEM_PROPERTY('TRANS1.T_DF1',VISIBLE) = 'TRUE' THEN
    SET_ITEM_PROPERTY('TRANS1.T_DF1',NAVIGABLE,PROPERTY_TRUE);
    SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF1');
    V_PREITEM := 'TRANS1.T_DF1';
    END IF;
    IF GET_ITEM_PROPERTY('TRANS1.T_DF2',VISIBLE) = 'TRUE' THEN
    SET_ITEM_PROPERTY('TRANS1.T_DF2',NAVIGABLE,PROPERTY_TRUE);
    SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF2');
    V_PREITEM := 'TRANS1.T_DF2';END IF;
    IF GET_ITEM_PROPERTY('TRANS1.T_DF3',VISIBLE) = 'TRUE' THEN
    SET_ITEM_PROPERTY('TRANS1.T_DF3',NAVIGABLE,PROPERTY_TRUE);
    SET_ITEM_PROPERTY(''||V_PREITEM||'',NEXT_NAVIGATION_ITEM,'TRANS1.T_DF3');
    V_PREITEM := 'TRANS1.T_DF3';
    END IF;

  • An easy question about GET_ITEM_PROPERTY

    Hello friends at www.oracle.com ,
    how can I obtain the item's initial value by using GET_ITEM_PROPERTY built-in? I couldn't find it even at Oracle documentation.
    Best regards,
    Franklin Gongalves Jr.

    Hello Shay,
    my objective is exactly not to depend on :BLOCK.item := value , because if I change :BLOCK.item initial value, I'd need to seek for each part of the program that contains the assignment we've described.
    I'd rather be making changes in only ONE point of the program - this is a situation where getting item's initial value, instead of assigning it, would be interesting, because if I change its initial value at item's properties, other parts of the program will automatically work with the new initial value, with no need to search the whole program to find where this initial value was set manually.
    And, in my case, the item is really a database item, but it's a situation where obtaining its value from GET_ITEM_PROPERTY ('BLOCK.item', database_value) might not help - sorry but it's quite complicated to explain.
    Thanks, and best regards,
    Franklin Gongalves Jr.
    can't you just do variable=:item_name?
    This will give you the value od the item. Do it at the point of time you need.
    Also if this is a database item, you can check the value in the DB and I think there is a get_item_property property of the db value as well.

  • Loop through all items in all data blocks?

    Is there a way to loop through every item in every data block and set the property of a format mask?

    I do not know what error it is, only that an on-error trigger fires.
    I found out one thing I was definitely doing wrong, using nextblock, nextitem properties at the wrong level.
    DECLARE
         v_firstblock VARCHAR2(50);
         v_currentblock VARCHAR2(50);
         v_firstitem VARCHAR2(50);
         v_currentitem VARCHAR2(50);
         v_counter NUMBER :=0;
         v_counter2 NUMBER :=0;
    begin
       v_firstblock := get_form_property(:System.Current_Form,first_block);
       v_currentblock:= get_block_property(v_firstblock,nextblock);
       MESSAGE(v_firstblock||v_currentblock);
         LOOP
              v_counter := v_counter +1;
              IF (v_counter >10) THEN
                   exit;
              END IF;
              IF (v_currentblock = v_firstblock) THEN
                             exit;
           ELSE
                   v_firstitem :=  get_block_property(v_firstblock,first_item);
                        IF (lower(GET_ITEM_PROPERTY(v_firstitem,format_mask))=lower('mm-dd-yyyy')) THEN
                                       SET_ITEM_PROPERTY(v_firstitem,format_mask,'DD-MON-YYYY');
                        END IF;
                   v_currentitem :=  get_block_property(v_firstblock,first_item);
                   v_currentblock:= get_block_property(v_currentblock,nextblock);
                   GO_BLOCK(v_currentblock);
                        LOOP
                             v_counter2 := v_counter2 +1;
                             IF (v_counter2>15) THEN
                                  exit;
                             END IF;
                             v_currentitem:= get_item_property(v_currentitem,nextitem);
                             MESSAGE(v_counter||v_firstblock||v_currentblock||v_firstitem||v_currentitem||v_counter2);
                             IF (v_currentitem <> v_firstitem) THEN
                                  IF (lower(GET_ITEM_PROPERTY(v_currentitem,format_mask))=lower('mm-dd-yyyy')) THEN
                                       SET_ITEM_PROPERTY(v_currentitem,format_mask,'DD-MON-YYYY');
                                  END IF;
                             ELSE
                                  exit;
                             END IF;
                        END LOOP;
               END IF;
      END LOOP;
         end;Here is updated new code. I am currently trying to debug it, it has crashed my form on the server when tied to a button press.
    EDIT: So far I have found that it infinitely loops through the first 3 items and a null item in the first block. Still looking into why...
    EDIT: Some code changes to temporarily stop infinite loop and make v_currentblock actually change. Still loops through same 3 items in the first data block even though v_currentblock changes.
    Edited by: 878576 on Oct 21, 2011 12:46 PM

  • GET_ITEM_PROPERTY

    Hello All,
    I am trying to get the item NAVIGABLE proeprty value as "if get_item_property('block.item',navigable) = 'TRUE' then
    else
    end if;
    But always I am egtting the property as false for some items. But these items keyboard navigable property set as true, enabled property set as yes and visible proeprty as yes, at the design time. Not any changes in run time.
    also I am getting one error "FRM-41805 Ambiguous item name : ........" error for these items. But always I am puting the block name with the item name.
    Any suggestion. I am using forms 10g.
    Regards
    SUN

    > I am getting one error "FRM-41805 Ambiguous item name : ........" error for these items. But always I am puting the
    block name with the item name.
    Are you sure you did everywhere? Search your entire form for the item name, and see how many places it turns up. I'll bet someplace, you left out the block.

  • 10gR2 App Server Windows- Get_Item_Property failing

    if Get_Item_Property ( 'block.item_name', 'ENABLED' ) = 'TRUE'
    fails on the application server (FRM-40735). Works fine on OC4J.
    Worked fine on the app server in 10gR1. This is where I had originally put
    this code. It now fails on 10gR2.
    Any ideas?
    Thanks

    And I've been doing forms since 1997.
    Changing it to:
    if Get_Item_Property ( 'block.item_name', ENABLED ) = 'TRUE'
    This solves my problem.
    It'd be easier is the 'ENABLED' just didn't compile. (And I believe it probably happened
    this way in 4.5/5.0).
    if Get_Item_Property ( 'block.item_name', 'ENABLED' )
    = 'TRUE'
    fails on the application server (FRM-40735). Works
    fine on OC4J.
    Worked fine on the app server in 10gR1. This is where
    I had originally put
    this code. It now fails on 10gR2.
    Any ideas?
    Thanks

Maybe you are looking for

  • Populating more than one table and more than one field

    I need some suggestions and this forum has always been a great source of good advice. I have a web form at the following location: http://www.webdevpractice.com/genoptix/CE/register.php Here's what the web form needs to do: Send a confirmation email

  • GP - CAF : How to capture data from impersonalized form.

    Hi All,           I have a requirement where in I have submit the data offline using an Adobe form and this data should be fed to an RFC any no if times. I have created a interactive callable object (Impersonalized form) using a form template. I'm ab

  • Lost My Browser Window

    I lost my browser window somehow and can't get it back. I can't type in any addresses. This must be an easy fix. Thanks

  • Placement of backups of word documents

    After typing a word document, an icon appears on my screen titled "backup of_____" (whatever I've just completed typing). It's an exact duplicate of the document. My screen is covered with these icons. How do I/where can I place these copies of my do

  • SAP IDM or CUA

    Hello Gurus, We have GRC 10 implementation project going on, there are like 5 systems which we proposed to be added to CUA and then connected to GRC for role provisioning. We have some confusion as to whether to go for IDM to manage the accounts cent