Duplicate rows in Detail Table - Master Detail Relationship

Hi,
I have developed the Page it has following components. (Jdeveloper 10g - R12)
1) Query RN
It has around 11 parameters, 5 parameters have LOV attached, 2 are mandatory parameters.
Auto Customization criteria. we don't criteria map defined , where clause is build based on parameters and vo.executeQuery gets called on Go button click.
2) Sales Order Table RN (Master)
3) Sales Order Line Table RN (Detail)
View link is created to maintain the master detail relationship and detail region is attached to AM using view link under master region.
Page flow works in this way, when user enter the parameters in search region and click on Go button, Sales Order table RN (master) gets populated.
It has radio button when user click it fires PPR event .
Process form request gets called and master row gets set (Same code as per developer guide) and Sales Order Line table RN (detail).
Problem is once detail region gets populate and when user change any parameter which has LOV attached somehow same rows gets added to detail region which is weird because we have not clicked on GO button and radio button on header region is also not touched but detail region is populated somehow.
Please help
Thanks.
Deepak

Provide the query used for populating the child records. Issue might be due to caching.
Thanks
Shree

Similar Messages

  • Second level detail in master-detail via VL does not return rows

    Sorry, I did not want to repost the entire thread. Please see the last entry in the following thread for my urgent question.
    second level detail in master-detail-detail does not return rows
    "second level detail in master-detail-detail does not return rows"
    Thanks so much!
    Teri

    Ahhh ... that explains everything!
    You wrote:
    ListView1
    -> ListRowView2 (via ListRowFkLink1)
    -> ListValueView2 (via ListValueFkLink2)
    That's why I thought it's a master and two details.
    But it's more like:
    ListView1
        -> ListRowView2 (via ListRowFkLink1)
              -> ListValueView2 (via ListValueFkLink2)Is that correct?
    That's the explanation.
    A ViewLink is basically a RowSetIterator controlling a detail RowSet. When the iterator navigates, the detail RS is refreshed.
    When you create a hierarchy in the wizard, the controlling master iterator is always the default iterator! But you used a new iterator (listRowIter) to iterate over your first detail. The default iterator of that first detail didn't move, hence the RowSet of your second detail was not refreshed.
    When you navigate in the tester, the tester always uses the default iterator. That's why it worked there.
    Sascha

  • File Browse column in Report (Detail of Master Detail)

    Is it possible for a column in my report of my detail (in master detail) to be a file browse type? The option isn't there for the column type and I cant find any htmldb_item.file_browse type of thing (like you can create checkbox in report using this).
    I have a master record and against the master it is possible to load up a number of files along with some other details. Looking at what the wizard has produced it doesnt appear possible to do what i want. I want to try and keep everything on the same page too.

    Not sure what you need to do but see this recent thread (and especially the one I reference within it): Re: Manual File Upload Form - problem getting record from wwv_flow_files
    Scott

  • How to eliminate the duplicate rows in the table

    How can we eliminate the duplicate rows in the table. Is it possible to write a single query or should we write a pl/sql block to do it

    Scope works outwards.
    SQL> DECLARE
      2    n NUMBER;
      3  BEGIN
      4    n := 0;
      5    DECLARE
      6      n number;
      7    BEGIN
      8      n := 2;
      9      dbms_output.put_line(n);
    10    END;
    11  END;
    12  /
    2
    PL/SQL procedure successfully completed.
    SQL> DECLARE
      2    n NUMBER;
      3  BEGIN
      4    n := 0;
      5    DECLARE
      6      x number;
      7    BEGIN
      8       dbms_output.put_line(n);
      9       n := 2;
    10        dbms_output.put_line(n);
    11    END;
    12  END;
    13  /
    0
    2
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2    n NUMBER;
      3  BEGIN
      4    n := 0;
      5    DECLARE
      6      x number;
      7    BEGIN
      8       dbms_output.put_line(n);
      9       x := 2;
    10     END;
    11       dbms_output.put_line(x);
    12  EXCEPTION
    13     WHEN others THEN      dbms_output.put_line('oh no!');
    14* END;
    15  /
         dbms_output.put_line(x);
    ERROR at line 11:
    ORA-06550: line 11, column 27:
    PLS-00201: identifier 'X' must be declared
    ORA-06550: line 11, column 6:
    PL/SQL: Statement ignored
    SQL> Cheers, APC

  • Need to remove duplicate rows from a table

    Hi Gurus ,
    I am using oracle 11.2.0.3 .
    SQL> desc osstage.S_EVT_ACT_X;
    Name                                      Null?    Type
    ROW_ID                                    NOT NULL VARCHAR2(15 CHAR)
    LAST_UPD                                  NOT NULL DATE
    PAR_ROW_ID                                NOT NULL VARCHAR2(15 CHAR)
    ATTRIB_17                                          NUMBER(22,7)
    ATTRIB_26                                          DATE
    ATTRIB_02                                          VARCHAR2(100 CHAR)
    PROCESS_TIMESTAMP                                  TIMESTAMP(6);
    now when i give the below command it gives the error as someone has disabled the constraint accidently .
    alter table s_evt_act_x enable constraint S_EVT_ACT_X_P1;
    Error starting at line 3 in command:
    alter table s_evt_act_x enable constraint S_EVT_ACT_X_P1
    Error report:
    SQL Error: ORA-02437: cannot validate (OSSTAGE.S_EVT_ACT_X_P1) - primary key violated
    02437. 00000 -  "cannot validate (%s.%s) - primary key violated"
    *Cause:    attempted to validate a primary key with duplicate values or null
               values.
    *Action:   remove the duplicates and null values before enabling a primary
               key.
    Can you please guide me with this issue .

    Please refer
    Script: Deleting Duplicate Rows from a Table (Doc ID 31413.1)
    How to Find or Delete Duplicate Rows in a Table (Doc ID 1004425.6)

  • JBO 35007 Row Currency has changed - Master Detail Table

    Hi,
    I have a one master table and one detailed table. I can create rows in the master table with no errors. However, when I try to insert rows in the detailed table, I receive JBO-35007 error, Row currency has changed.
    How do I fix this?
    thank you

    We also has exact same error in Hyperion 11.1.1.3 on Windows 2003 with Oracle 11.1.7.0 database .. can someone advise please?
    Regards
    -Naveed-

  • Row level validation for Master-Detail form

    OA JDeveloper 9i (RUP5) 9.0.3.5 (Build 1453)
    I have a form which is based on a master detail relationship.
    - For each employees details (Advancetable) based on a EO (AbsenceInputsEO)
    - For each employee you can add one or more allowances records (AdvanceTable) VO (AbsenceInputsVO)
    Both the above VO and EO is based on the same table (XHR_BWCD_KRONOS_INTERFACE)
    How do stop a user from selecting (radio button) the next employee in an advance table (master level), it the the records they entered at the detail level for the previous employee is not valid?
    I used the the same validation method I used for the "APPLY" event to validate the records entered at detail level
    to the "EmployeeSelect" event, but the error message showed only after the new employee has been selected. Thus the error message that is displayed does not relate to the employee record selected at that stage.
    How do I prevent the user from selecting the next employee in the Master(Advancetable) if the records in the Detail(AdvanceTable) is not valid?

    Thanks for you help,
    Where able to reset the "SelectFlag" for the employee the error related to, but now I endup with two radio buttons being selected. One for the employee which the error relates to and one for the employee which triggered the validation when user navigated away from the current employee record.
    I need to be able to set the attribute "SelectFlag" for any other employee selected in the master record to "N", before the error is thrown. I do not seem to be able to access the newly selected employee record to set the "SelectFlag" to "N" as I only have access to the currentrow SelectFlag in the processFormData.
    It looks to be if I can only access the new selected employee in the processFormRequest(OAPageContext pageContext, OAWebBean webBean), but I never get to this method as the error message stop processing in the processFormData().
    I have the following code in the processFormData(OAPageContext pageContext, OAWebBean webBean)
    if ("EmployeeSelect".equals(event))
    if (!IsValid(pageContext,am,true,AsgJobName,EmpStartDate.toString()))
    // oracle.jbo.Row ValidationRow = vo.getFirstFilteredRow("SelectFlag", "Y");
    // Set flag for employee record with error
    Row [] rows = vo.getFilteredRows("SelectFlag", "Y");
    // getFilteredRows returns a zero-length array if it finds no matches.
    if ((rows != null) && (rows.length > 0))
    // Set the master row and get the unique identifier.
    Row masterRow = rows[0];
    am.findViewObject("EmployeeAbsenceDetailsVO1").getCurrentRow().setAttribute("SelectFlag","Y");
    vo.setCurrentRow(masterRow);
    // Unselect new Employee
    throw new OAException(ErrorMessage, OARowValException.ERROR);
    } // EmployeeSelect-Event
    Question:
    =======
    Can I access the newly selected employee rows from the processFormData to reset the "SelectFlag" to "N" before I through the error message? I would like to be able to do this in the section I have marked "// ?????", before I throw the error. How would I do this?

  • Parsing XML document with nested elements into multiple db tables(master-detail)

    Can you help me with storing xml document into master-detail tables?
    I have two tables:
    1) customers (customerid number primary key, firstname varchar2(30),lastname varchar2(30))
    2) cust_addresses (customerid number references customers, street varchar2(30),city varchar2(30),state varchar2(10),zip varchar2(10))
    I have XML document:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW num="1">
    <CUSTOMERID>1044</CUSTOMERID>
    <FIRSTNAME>Paul</FIRSTNAME>
    <LASTNAME>Astoria</LASTNAME>
    <HOMEADDRESS>
    <STREET>123 Cherry Lane</STREET>
    <CITY>SF</CITY>
    <STATE>CA</STATE>
    <ZIP>94132</ZIP>
    </HOMEADDRESS>
    <HOMEADDRESS>
    <STREET>N.Fryda 4</STREET>
    <CITY>CB</CITY>
    <STATE>CZ</STATE>
    <ZIP>37005</ZIP>
    </HOMEADDRESS>
    </ROW>
    </ROWSET>
    I know that I must use DBSM_XMLSave package, create view and instead of trigger but I did found no example in documentation.
    Thanx.

    Interested question; one I do not know the answer to at the moment, I am afraid. I would like to know your results.
    To tell others, though, what I have done. I did finally adapt Muench's not-yet-published examples #71 to work with a table. Here the table has as it's value "#{backing_app_EPG_DAYPG.jobDayDriverTable[row.Id1]}"
    This accesses a hash map defined in the backing bean as follows:
    public Map jobDayDriverTable = new HashMap(){
    @Override
    public Object get(Object key) {
    Number jobDayId = (Number)key;
    if (getEpgDayPage().jobDayDrivers(jobDayId) != null) {
    return getEpgDayPage().jobDayDrivers(jobDayId).getAllRowsInRange();
    else return null;
    jobDayDrivers returns RowIterator. From this I call getAllRowsInRange which returns a Row[]. The table consumes this as a value, and lists the values as I want.
    Since the table is using Rows for its rows, I am guessing that it would have access to #{row.rowKeyStr}, or at least #{row.<pk>} which would allow you to programmatically set the current row using code like the following:
    public static boolean setCurrentRow() {
    // BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    // bindings.getOperationBinding("setCurrentRowWithKey");
    (OperationBinding)EL.get("#{bindings.setCurrentRowWithKey}");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return false;
    return true;
    You could call this as part of code in a pages backing bean behind a button or link.
    Hope this helps somebody.
    By the way example #71 was to get a detail set of rows from a master row value and display the detail set in the master row of an af:table.
    You can find this and other examples at http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html

  • "Failed to validate all rows" when inserting in master detail scenario

    Hi,
    I have problem writing data in a master detail scenario..
    i use the following bean method to write data.
    Data is inserted in the master table successfully but when i try to commit in the details table i get the error "Failed to validate all rows in a transaction."
    public void save(ActionEvent actionEvent)
    //writing into master table
    DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind =
    (DCIteratorBinding)bindings.get("Master1Iterator");
    MasterVOImpl vo_pr = (MasterVOImpl ) iterBind.getViewObject();
    Row r=vo_pr.createRow();
    r.setAttribute("Name", name);
    Number num =(new oracle.jbo.server.SequenceImpl("new_seq",vo_pr.getDBTransaction())).getSequenceNumber();
    r.setAttribute("Id",num);
    vo_pr.insertRow(r);
    vo_pr.getDBTransaction().commit();
    //writing into details table
    DCIteratorBinding scopeiterBind =
    (DCIteratorBinding)bindings.get("Detail2Iterator");
    DetailVOImpl vo_sc = (DetailVOImpl) scopeiterBind.getViewObject();
    Row rs=vo_sc.createRow();
    rs.setAttribute("iddetail",iddetail);
    rs.setAttribute("Name", Name);
    rs.setAttribute("id",num);
    vo_sc.insertRow(rs);
    vo_sc.getDBTransaction().commit();
    Note: the Detail iterator used here is the one under the master in the AM

    In case your model defined a view link from master to detail should try to get the detail iterator from the master and use this to create the new row.
    Row r=vo_pr.createRow();
    r.setAttribute("Name", name);
    Number num =(new oracle.jbo.server.SequenceImpl("new_seq",vo_pr.getDBTransaction())).getSequenceNumber();
    r.setAttribute("Id",num);
    vo_pr.insertRow(r);
    // this method gets the detail iterator for the master row you just created.
    // The name of the method depends on the view link in your model you expose to the master view
    Row rs=vo_pr.getDetail().createRow();
    rs.setAttribute("iddetail",iddetail);
    rs.setAttribute("Name", Name);
    // this value should be added by the framework
    //rs.setAttribute("id",num);
    vo_sc.insertRow(rs);
    vo_pr.getDBTransaction().commit();Timo

  • Master Detail - Master Report Rows doesn't match master detail scroll

    Hello,
    Another rookie question. I created a master detail form and report. I am controlling the report with a where clause to only view the rows where the current application user is the record owner. For example, my app user login is the email address of the user. Then I filter the rows to only display the rows associated to the users email address. So, if the table contains 100 rows, only the 10 rows that the user is associated with, displays in the report.
    When I drill into a record, i am presented with the correct master detail form with the correct data, however, when I click the Next and Previous buttons, I can see the entire record set. For example, if I only saw 10 rows on the report, I can scroll through all hundred records once i drill in from the report.
    How do I limit the data to match the visibility that i set at the report.
    Thanks!
    -Brent

    fixed.

  • Matser Table/Detail Table -- Hide detail panel when no row

    Hi,
    I would like to hide the detail panel when the user selects a row in the master table without detail.
    I try to put something like this:
    <af:panelHeader
    rendered="#{bindings.MyView2.estimatedRowCount>0}">
    But it does not work, instead the previous detail rows are display when there is no detail rows for the master row.
    I need to to press a button <af:commandButton text="Apply change"/> , to render the page correctly.
    The selection facet used in the master table is defined as follow:
    <f:facet name="selection">
    <af:tableSelectOne autoSubmit="true"></af:tableSelectOne>
    </f:facet>
    Where am I wrong, it is my first project with ADF ?
    Any help will be appreciate,
    Thanks,

    Well not really clear if it's a bug or not, but here's two workarounds:
    1- the table is surrounded by a panelCollection, if we add a partial trigger from the panelCollection to the table, on every change of row selection the table refreshes itself.
    2- The second option was to remove the primary keys from the entity, and force it to use RowId as the primary key.
    This is such a weird behavior in ADF, it's one of the basic things that one will do in an application. We tried to do a test on a smaller app and it gave the same results.
    Here's the scenario:
    Master/detail linked by two keys
    Master PK (key1, key2)
    Detail PK (key1, key2, key3) => key1 and key2 are the link between the tables.
    If anyone can reproduce this and confirm if it's a bug, it would be greatly appreciated.
    Mo

  • Master-detail table where detail is in a bounded task flow

    Dear all,
    Iam pretty much new to ADF 11g. I have the following question.
    I have a search form(using af:query) created from the View Criteria of a view. The search results are displayed in a master-detail table, since my view has the following form in the data control:
    MasterView ->DetailView
    I would like that the detail table be part of a page fragment of a region of a bounded task flow. And of course, the detail table should be refreshed every time another row is selected in the master table.
    Is this feasible? Because I find difficulties in the following areas:
    1. How to pass a parameter to the bounded task flow that will display the detail table?
    (I suppose that I will need to build a new view to display the DetailView. In the WHERE clause I will have to pass the id of the row clicked in the master table.
    2.How passing the variable to the bounded task flow of the detail table be implemented when clicking the row of the master table? In similar examples I have seen, e.g. in the ADF Code Corner, there is always a submit button that sets a pageFlowScope variable.
    Is my approach feasible or it needs a lot of ADF twisting?
    Edited by: dimitris74 on Sep 12, 2011 6:20 AM

    Hi,
    If you have two different regions in your page for master and details and you want to refresh the child table based on your master row selection then you can use the contextual actions. Raise an event whenever you select a row and send your master-table id as the payload. Have a handler method at the detail page and execute some logic to get the rows for the selected master record.
    I hope it helps you.
    Thanks,
    Lakshman

  • Insert multiple row of BLOB using Master Detail Form

    Hi,
    I try to insert multiple photos in a master detail form (just like we upload attachments when sending email), but it seems that the Tabular Form doesn't support adding a row with BLOB. I have searched the User's Guide and API Reference, but no answer on this issue.
    Anyone can help?
    regards,
    Wei

    Many thanks,
    I find another way. I released the FK of these two tables and used the code:
    Insert into PRODUCT_INFO (TITLE) values(:P1_TITLE);
    IF ( :P1_PHOTO1 is not null ) THEN
    INSERT INTO PRODUCT_IMG(PHOTO, MIMETYPE, PROPERTY_ID)
    SELECT blob_content,mime_type, "PRODUCT_INFO_SEQ".currval
    FROM APEX_APPLICATION_FILES
    WHERE name = :P1_PHOTO1;
    DELETE from APEX_APPLICATION_FILES WHERE name = :P1_PHOTO1;
    END IF;
    IF ( :P1_PHOTO2 is not null ) THEN
    INSERT INTO PRODUCT_IMG(PHOTO, MIMETYPE, PROPERTY_ID)
    SELECT blob_content,mime_type, "PRODUCT_INFO_SEQ".currval
    FROM APEX_APPLICATION_FILES
    WHERE name = :P1_PHOTO2;
    DELETE from APEX_APPLICATION_FILES WHERE name = :P1_PHOTO2;
    END IF;
    The disadvantage is that I have to set a certain number of items for inserting photos; the max numbers of uploaded photos cannot decided by users.
    Regards.

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

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

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

  • How to manually add second detail on master detail page

    Hi,
    Apex 4.1
    can anyone tell me which steps to take excactly to manually create a second detail region on a master-detail form ?
    So far I've copied the first detail region and customized it to the second detail table. Copied the processes and adjusted them.
    What happends now is whenever I push one of the 2 "add row" buttons the rows are always added to the last region shown on the page. (also if I try to change anything on the data on the form and submit it all kind of errors show up )
    It seems like the javascript:addrows() does not work for the region it's defined in, but how to adjust this ??
    If I'm forgetting any other steps please also let me know.
    Found multiple threads on this but so far no explanation on how to manually do this.
    Cheers
    Bas

    Bas,
    Multiple tabular forms or detail regions on a master-detail form are not yet supported. So you best option would be to make one or both of the detail regions read-only report regions with edit links on each row, which would take you to a detail edit page. Alternatively you could try to manually build two tabular form regions on your page, however you will not be able to use any of the built-in tabular form features then, incl the add-row functionality, the multi-row update processes and declarative validations. So all of this would need to be hand-coded in PL/SQL and JavaScript. We have plans to support multiple tabular form regions out of the box, but we don't yet when this might make it into APEX.
    Regards,
    Marc

Maybe you are looking for