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]

Similar Messages

  • Problem In Displaying records in table

    Hi,
    I have created a table and set the records displayed property as 10.But in controller I am dynamically inserting one row in the table at index 0.
    So whenever the vo returns morethan 10 rows ,the table displays last record first.Suppose the vo returns 11 records,then in the page I am able to see
    only the last record i.e 11th record,then i have to navigate in the table to see the first 10 records.My requirement is I want to see the 10 records first.PLs help me.

    The following code is written in co process request.
    OAViewObject oaviewobject = (OAViewObject)am.findViewObject("XXCHRCwkMatchingPersonVO1");
    oaviewobject.setWhereClauseParam(0,first_name);
    oaviewobject.setWhereClauseParam(1,last_name);
    oaviewobject.setWhereClauseParam(2,dtStartDate);
    oaviewobject.executeQuery();
    pageContext.getApplicationModule(webBean).invokeMethod("checkCwkDuplicates");
    -------------AM method
    public void checkCwkDuplicates()
    PerOAViewObjectImpl peroaviewobjectimpl = getXXCHRCwkMatchingPersonVO1();
    OARow oarow = (OARow)peroaviewobjectimpl.createRow();
    Number n=new Number(0);
    String s35 = getOADBTransaction().getMessage("PER", "PER_289352_DUP_PER_NO_MATCH", null);
    oarow.setAttribute("FullName", s35);
    oarow.setAttribute("Mondiff", n);
    oarow.setAttribute("Switcher", "Enable");
    peroaviewobjectimpl.insertRowAtRangeIndex(0, oarow);
    pls help me.

  • Problem with displaying records from the database in a table ui element

    Hi,
    Iam creating an application which retrieves data from an oracle database. Iam able to connect to the database and retrieve the data in a result set. Then I try to set these values in a context node as follows,
    while (resultSet.next()) {
    String name = result.getString(1);
    String EmpId = result.getString(2);
    IEmpNode node = wdContext.nodeEmp();
    IEmpElement el = node.createEmpElement();
    el.setName(name);
    el.setEmpId(EmpId);
    node.addElement(el);
    where the context structure is emp(node)
                                   ---name(attribute)
                                   ---empId(attribute)
    Then I have bound the node emp to a table ui element.If I try to deploy this it comes up with Internal Server error.
    But if try this way, without creating a node, only with attributes name and empId,
    wdContext.currentContextElement.setName(name);
    wdContext.currentContextElement.setEmpId(EmpId);
    and binding the attributes to inputfields in the view, Iam able to see the last record in the database table.
    So where am I going wrong while using the table ui element?
    Regards,
    Rachel

    Hi
    Try this
    //Create the node in outer of while loop and bind to Table UIElement
    IEmpNode node = wdContext.nodeEmp();
    while (resultSet.next()) {
    String name = result.getString(1);
    String EmpId = result.getString(2);
    IEmpElement el = wdContext.createEmpElement();
    el.setName(name);
    el.setEmpId(EmpId);
    node.addElement(el);
    Kind Regards
    Mukesh

  • 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

  • Conditionally display an icon for each record in a multi record block

    Hi,
    I am using Forms 6i. Is there any way to conditionally display an icon for each record in a multi record block. The SET_ITEM_INSTANCE_PROPERTY builtin does not have many choices. Thanks for your help.

    Henry,
    I doubt that. You would have to replace the text item with an image item. This however can't be done for individual cells in a table but only for the whole column.
    On the web chances are that these could be handled with a custom PJC, but this solution doesn't work in client/server
    Frank

  • How to set default settings to display record count in multi record block

    Hi All
    Whenever I query my multi record block, I get 1/? as record count at the console in standard Oracle Applications. Is there any setting so that it displays 1/50 (in case total record queried is 50). I don't want to set query all property of block as I don't have any control in standard Apps forms.
    Thanks in advance
    Navdeep

    Check out the next_navigation_item option for the get_item_property procedure. If you use this you can do the process without having to navigate from one item to the next.
    You can do something like this (untested) to move and resize the items (other than the first in the block):
    PROCEDURE move_and_resize(p_item IN ITEM, p_width IN PLS_INTEGER) IS
      prev_item ITEM := Get_Item_Property(p_item, PREVIOUS_NAVIGATION_ITEM);
    BEGIN
      Set_Item_Property(p_item, WIDTH, Get_Item_Property(p_item, WIDTH) + p_width);
      Set_Item_Property(p_item, X_POS, Get_Item_Property(prev_item, WIDTH) +
                                       Get_Item_Property(prev_item, X_POS));
    END move_and_resize;
    move_and_resize(myitem, -30);

  • Multi Record Block Problem

    Hi,
    I have a multi record block with two fields NAME and DATE. On clicking the Save Button a procedure (PROC_BEFORE_SAVE) is called which loops through this block, and deletes empty records.
    PROC_BEFORE_SAVE
    LOOP
         IF :TI_NAME IS NULL THEN
              DELETE_RECORD;
         END IF;
         NEXT_RECORD;
         EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
    END LOOP;
    The proc fails and throws error (Oracle Error Unable to Update Records) only for the case that the first few records are null. Sample data given below.
    Name  -  Date
    NULL  -  NULL
    NULL  -  NULL
    NULL  -  NULL
    AJ  -  10/02/2005
    JA  -  12/12/2004
    AJV  -  12/12/2002
    This happens because it tries to update the NOT NULL field NAME as NULL.
    Could somebody please tell me why this is happening? Is there something wrong with the procedure?
    I am using Oracle Forms 6.0.8.8.0 in Windows 2000 Professional edition.
    Any help would be greatly appreciated.
    Thanks,
    Anoop

    Hi,
    Thanks for the reply. But CLEAR_RECORD also doesn't seem to work.
    Thanks,
    Anoop

  • How to do it in multi-record block

    Hi all,
    i have 1 text items in a multi-record block number of record displayed 10
    and i have values like 100 , 50, 30 in first 3 records and in 5th record i want to put some value like
    20 then i want to calculate all values like 100 + 50 + 30 +20 = 200 and i want to put the total value in a single record block.
    but my problem is i cannot able to calculate all the value because for the totale value i have to
    write a for loop to loop through the record
    but go_block() is not working in post_change .
    if any solution is there plz suggest.......

    Hi zeeshan
    my problem is i cannot able to calculate all the value because for the total value
    put the total value in a single record block.
    First pls the following...
    Guidelines for Working with Calculated Items Calculated items_
    1- They are display-only control items.
    2-Calculated items cannot be database items.
    3.While you can set a calculated item's Enabled, Mouse Navigate, and Keyboard Navigable properties to Yes,
    you cannot set the Insert Allowed or Update Allowed properties to Yes
    Second Keyword: TOTAL is a reserved oracle key word... pls read the Details...
    go_block() is not working in post_change .well u can use timers but no need for it u can reference block item but first u have to accumulate the values per record in WHEN-VALIDATE-ITEM TRIGGER in the last calculated item which is inserted by the user and assign it to the display item in ur current multi-record block :*block_name.total_item*.. as follow...
    :block_name.total_item := :item1 + .... ; Then u create a second display item > no of records property = 1 , named e.g. final_summarized_totals
    In order to summarize this total values accumulated in the multi-record display item named e.g. block_name.total_item
    Finally using PRE-INSERT , PRE-UPDATE,PRE-DELETE Triggers to assign the value calculated into the display item * block_name.total_item* into the db_item into the previously mentioned Trigger Block-Level Off-course.
    :block_name.total_db_tem := :i:block_name.final_summarized_totals ; Hope this helps...
    Regards,
    Amatu Allah

  • Check duplicate data entry in multi record block,which is a mandatory field

    Dear all,
    I have a situation where i have to check duplicate data entry(on a particular field,which is a mandatory field,i.e. it cannot be skipped by user without entering value) while data key-in in a Multi Record block.
    As for reference I have used a logic,such as
    1>In a When-Validate-Record trigger of that block I am assigning the value of that current item in Table type variable(collection type)
    as this trigger fire every time as soon as i leave that record,so its assigning the value of that current time.And this process continues
    then
    2>In a When-Validate-Item trigger of that corresponding item(i.e. the trigger is at item level) has been written,where it compares the value of that current item and the value stored in Table type variable(collection type) of When-Validate-Record trigger.If the current item value is matched with any value stored in Table type variable I am showing a message of ('Duplicate Record') following by raise_form_trigger failure
    This code is working fine for checking duplicate value of that multi record field
    The problem is that,if user enter the value in that field,and then goes to next field,enter value to that field and then press 'Enter Query 'icon,the bolth Validate trigger fires.As result first when-validate record fires,which stores that value,and then when-validate-item fires,as a result it shows duplicate record message
    Please give me a meaningful logic or code for solving this problem
    Any other logic to solve this problem is also welcome

    @Ammad Ahmed
    first of all thanks .your logic worked,but still i have some little bit of problem,
    now the requirement is a master detail form where both master and detail is multirecord ,where detail cannot have duplicate record,
    such as..........
    MASTER:--
    A code
    A1
    A2
    DETAIL:--
    D code
    d1
    d2 <-valid as for master A1 , detail d1 ,d2 are not duplicate
    d2 <--invalid as as for master A1 , detail d2 ,d2 are duplicate
    validation rule:  A Code –D Code combination is unique. The system will stop users from entering duplicate D Code for a A Code. Appropriate error message will be displayed.*
    actually i am facing a typical problem,the same logic i have been applied in detail section ,its working fine when i am inserting new records.problem starts when i query,after query in ' a ' field say 2 records (i.e. which has been earlier saved) has been pasted,now if i insert a new record with the value exactly same with the already present value in the screen(i.e. value populated after query) its not showing duplicate.................could u tell me the reason?and help me out...............its urgent plzzzzzzzzz
    Edited by: sushovan on Nov 22, 2010 4:34 AM
    Edited by: sushovan on Nov 22, 2010 4:36 AM
    Edited by: sushovan on Nov 22, 2010 8:58 AM

  • Query about multi record block

    Abdetu
    Please clarify this
    I have a multi record group on the canvas, which displays 5 records at a time. The block is based on a table. All the items, except 3 items are displayed items.Now in the block I have a list item, in which I have two values "PO" and "TSF".. If user selects PO, associated text items will get enabled and user will be entering the values .. Same is the case with TSF .. And at the end user selects Ok button to save the record to the database
    Now while fetching the records (based on query) ..once the records are fetched, control will be on PO/TSF list box, now the user can either change PO to TSF or TSF to PO ..or he/she may opt not to change also.. If user changes PO to TSF, only that particular record's TSF fields should get enabled .. The problem what I am facing is, when the control comes to PO/TSF list box.. since its multi record block, all the record's PO/TSF list box are getting enabled
    In the sense, if control is in the 1st record of multi record block, only those fields should get enabled, once the user navigates to the text item which is the last of that particular record, then 2nd record should get enabled....
    Can I know the solution
    Regards
    Message was edited by:
    Seshu
    Message was edited by:
    Seshu

    Hello Seshu
    ur case explanation should be in points 1,2,etc as possible leaving extra lines and spaces in between .. and the case should be more clear and summarized like:
    1- I have multi-records data block.
    2- I have a static list item with 2 values eg. (a and b).
    3- Depending on selecting from the list some items r enabled.etc.
    Kindly note that, this will facilitate ur problem to be more readable,recognizable and save time and effort of someone who wants to help u.
    Here comes the confusion:
    Now while fetching the records (based on query)
    The problem what I am facing is, when the control comes to PO/TSF list box.. >since its multi record block, all the record's PO/TSF list box are getting enabled i think with the piece of code i have just posted to u this can't be happened since it disable all the record's PO/TSF.
    if this didn't solve ur problem i suggest either u post ur code to help u or u try to put some validations with :
    if statment inside the loop depending on the list item's values which will enable or disable related items to the list.
    Hope this help u,
    If any Questions pls let me know..
    Regards,
    Abdetu..

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Is it possible to requery only a single row of a multi record block?

    Hi,
    I have a data block say "Employees". This is a multi record block.
    Requirement: Two users are working on the same form (front end). Now the user1 has made change for EMP1 The same is not reflected in the User2 Session. Hence i need to requery the values updated for EMP1
    Issue: Since there lots of employees listed in this block. i do not want all the employees details to be required (Block requery). Instead is it possible to requery only a perticular record to be required?
    Thanks,
    Vidya

    I think not possible........
    Usually Approach is the data in grid table displays as read only and when user press EDIT button then they can edit one single record in a separate window.
    ooh got one idea.......
    may be create a save point and rollback to that particular save point ....... i hv never tried it but try it might solves your problem
    there is a feature of Clear_form rollback to save point
    PROCEDURE CLEAR_FORM
      (commit_mode    NUMBER,
       rollback_mode  NUMBER);
    Parameters
    If the end user has made changes to records in the current form or any called form, and those records have not been posted or committed, Form Builder processes the records, following the directions indicated by the argument supplied for the following parameter:
    commit_mode     ASK_COMMIT  Form Builder prompts the end user to commit the changes during CLEAR_FORM processing.
    DO_COMMIT  Form Builder validates the changes, performs a commit, and flushes the current form without prompting the end user.
    NO_COMMIT  Form Builder validates the changes and flushes the current form without performing a commit or prompting the end user.
    NO_VALIDATE  Form Builder flushes the current form without validating the changes, committing the changes, or prompting the end user.
    rollback_mode     TO_SAVEPOINT  Form Builder rolls back all uncommitted changes (including posted changes) to the current form's savepoint.
    FULL_ROLLBACK  Form Builder rolls back all uncommitted changes (including posted changes) which were made during the current Runform session.  You cannot specify a FULL_ROLLBACK from a form that is running in post-only mode.  (Post-only mode can occur when your form issues a call to another form while unposted records exist in the calling form.  To prevent losing the locks issued by the calling form, Form Builder prevents any commit processing in the called form.) Edited by: BaiG on Apr 12, 2010 3:49 PM

  • Fill a multi record block with a for-loop

    Hi
    I've got a simple question but I couldn't find a solution yet.
    I have a multi record block and behind this i wrote a post-query-trigger with a cursor and a for-loop. Now I try to show each record of the for-loop in the multi record block. The loop works correctly, but the problem is that I only see the last found record of the loop in the first multi record and I'm not able to go to the next multi record when the loop finds more then one record.
    I tried to use NEXT_RECORD but then I got the error message "100500: non-ORACLE exception".
    May someone help me? Thanks a lot!

    What exactly are you trying to do? If you are simply trying to display the result of a query in a Multi-Record Block (MRB), I would recommend basing your block on the query (From Clause Query) or if you are simply displaying the contents of a table or a view in the block, base your MRB on the table or view and let Forms handle displaying the records.
    The Post-Query (PQ) trigger will execute for each record displayed in the MRB, which I'm sure is not what you intended. Since the trigger fires for each record, your loop is essentially assigning the value of each row in the cursor to the same row in the MRB.
    Hope this helps.
    Craig...

  • Get next value in a Multi Record Block

    Hi,
    I've a Multi Record block with 2 items like below.
    pos width
    1 7
    8 5
    13 5
    18 2
    ie pos in next item is sum of pos and width of previous item.I've already implemented this.
    The problem is if the user changes width in a particular record,I want to change next records pos automatically.
    To achieve this,I wrote a when-new-record -instance-trigger as follws:
    if :system.cursor_record=1 then
    :pos:=1;
    elsif :system.record_status='changed' then
    :pos:=:pos+:width;
    end if;
    but even Though I change column width of block,:system.record_status still remain 'INSERT'.
    Pls can u pls tell me how can I acheive this?
    Prashanth Deshmukh

    You cannot use Record Status like that.
    You need to create a procedure that loops through your entire block, keeping track of the pos and width of the prior record to calculate the new pos of each record.
    Your procedure would need to do something like this:
    Declare
        v_Pos  pls_integer := 1;
    Begin
      Go_block('B1');
      First_Record;
      Loop
        Exit when :System.record_status='NEW';
        :B1.pos := v_Pos;
        v_Pos := v_Pos + :B1.width;
        Exit when :System.last_record = 'TRUE';
        Next_Record;
      End Loop;
      First_Record;
    End;

  • How to call a report with a bind variable from a multi-record block

    Hi,
    I have created a report using the BI Publisher functionality. I did all the integration, created the SQL Query and uploaded the template. Up till here everythings fine!
    My SQL Query has 2 bind variables.
    I will call my report from a multi record block, at the end of each record an icon is shown which the user can click to open the report.
    I created a column link for this item (PRINT_REPORT=Inschrijvingsformulier) but I do not manage to pass the parameters to my report. The parameters I want to pass are 2 columns in this Multi Record block.
    I created 2 hidden fields on the page P9_PARAMETER1, P9_PARAMETER2 with the same names as my bind variables and fill this in with the values #PARAMETER1#, #PARAMETER2# from the multi record block.
    It seems it does not work as my report stays empty. (also XML file stays empty).
    Am I trying the wrong way?
    Thanks for any advice,
    Kris

    hi khadeer,
         create one report program and write the required code,and call this function module 'SSF_FUNCTION_MODULE_NAME' and give your smartform name  and also when u activate ur smart form u will get one function module call that function module also and specify any tables used...
    i think this solves ur problem...
    any queries revert back..
    pls reward points if helpful,
    shylaja

Maybe you are looking for

  • How are tax updates handled in SAP for asset depreciation?

    We are implementing Assets and currently using a system that not only calculates the tax on depreciation but also updates any new changes to the taxes as mandated by the federal and state government. My understanding is that SAP does not auto update

  • Help needed with XML

    Hi guys, i was wondering if it is possible to copy data from xml file into array and use that data to make search in some other xml file. Since i coulnt get any help on my previous post am raising this question. I have lot more to ask but right now t

  • IOmega drive - where are you?!

    Hello, I hope someone can help me 1) solve this problem and 2) give me some tips on how to avoid if it was self induced. My iOmega external HDD won't automatically mount. It does not display in Disk Profiler. In System Profiler I can see an unknown F

  • [Beginner Oracle 10g on Solaris 10]Script Root.sh asking road

    Hello, Need help please, Iam near the end of my installation Oracle 10g on Solaris 10, Oracle installer ask me to execute Root.sh, he ask me a path, suggesting me this road /usr/local/bin The message is Enter the full pathname of the local bin direct

  • Crawler - Refreshing Previously Imported Documents

    I checked the box in red below and it updated the MetaData for a pdf that the customer said was not updating. I then re-ran teh crawl. The document updated the meta data BUT IT ALSOso marked all the documents as updatedLWill this checkbox always caus