Master detail: select in form (newbie)

I've been looking at this example:
http://labs.adobe.com/technologies/spry/samples/data_region/DataSetMasterDetailSample.html
The bit of code I cannot understand is this:
onchange="document.forms[0].citySelect.disabled = true; (That's in
the first "select" element.)
Indeed, when I test this on a page of my own, I must remove
this bit of code to get the second select list to work properly.
That is, in my trials that bit of code seems to inhibit the second
list from populating per the selection from the first data set.
This seems logical: the element with id="citySelect" is somehow
"disabled". But in the Adobe example it works just fine... so I
guess I am asking under what circumstances is the "disabler"
disabling...
TIA,
Greg Smith

Hi,
what you initially did should work. However, a master may have many children and the attribute you move into the form is the one of the first detail row. So if the master does not have details then you only see the label.  I don't know why you have to build this construct, but wouldn't it be better to add the attribute on the View Object directly (adding a second entity object rerference)?
Frank

Similar Messages

  • Default the master / detail select lists

    When I load a form that has pre-existing data I need to be
    able to default the master / detail select lists to the correct
    values.
    (so the lists load with the correct values "selected" in each
    case.)
    Is it possible to do this and if so, how?
    Thanks in advance for any insight.

    Checkout this post. In it, I show how to do it using a couple
    of global variables:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=602&threadid =1308016&highlight_key=y&keyword1=SetDefaultState
    But it could easily be modifed to get the default values from
    the URL. See these samples for how to do that:
    http://labs.adobe.com/technologies/spry/samples/utils/URLUtilsSample.html
    http://labs.adobe.com/technologies/spry/samples/data_region/DataWithURLParams.html
    --== Kin ==--

  • Implement Master Detail type of form

    Does anybody have tutorial or sample code to implement a master-detail kind of form?
    I am really stuck here.
    Could anyone please help?

    I have looked into that topic, but still i could not figure out.
    When we query display the form in Update mode, by just querying the Master record, the Detail records don't show up.
    I have used a Simple table for my detail records, but the master record is just some text field.
    The rows dont appear in the Simple Table.
    This is the problem that i am getting.

  • Multiple Master Detail Relation In Forms 6i

    I have tables as below
    1.Bill_Head
    Bill_No
    Bill_Date
    Fin_Year_Cd
    Remarks
    2.Bill_Tail
    Bill_No
    Product_Cd
    Amount
    Ded_Amount
    Net_Amount
    3.Bill_Tail_Det
    Bill_No
    Product_Cd
    Quantity
    Rate
    Interest_Percent
    Service_Charge
    Vat_Tax_Percent
    The Relation is like
    Between BILL_HEAD and BILL_TAIL is Master Details Relation
    Between BILL_TAIL and BILL_TAIL_DET is one to one relation
    In single form i am not able to insert record.
    If i build Master details between BILL_HEAD and BILL_TAIL, BILL_TAIL and BILL_TAIL_DET, when i run the for to insert data.
    I will put the data for BILL_HEAD data
    For this parent record there will be child record in BILL_TAIL block.
    For this BILL_TAIL parent record there may be a child record in BILL_TAIL_DET or may not. Suppose i put a child in BILL_TAIL_DET.
    Then i wanted put one more child record in BILL_TAIL block, if i say next record, it is asking me to "save the record first".
    Please help me in this regards
    my mail id : [email protected]
    Regards
    Mahaveer
    Message was edited by:
    user603318

    Thanks Kris, for your reply.
    Is there any way out to enter all the data at once and then commit, b'cse for every record asking to commit is tedius.
    Regards
    Mahaveer

  • Master-detail page with form layout -- insert only -- not in create mode

    JDeveloper 10.1.3.1 with JHeadstart
    I have the following master-detail structure in JHeadstart:
    Group 1, Table a, Layout: table-form
    Group 2, Table b, Layout: table-form
    Group 3, Table c, Layout: form
    Group 4, Table d, Layout: form (on same page as master table c)
    Table a, b and c are updatable (insert, update and delete).
    I have problems with the last page, tables c and d, master-datail both in form layout.
    The master-table (c) is not an insert-only table, the detail table needs to be an insert-only form on the same page as the master table c.
    Settings Table d:
    Advanced search and quick search: none
    Autoquery: disabled
    Single row insert allowed (other options in Operations disabled)
    In my view object I have used the settings in the JDeveloper guide 8.1.2 ('no rows...' in tab Tuning).
    I run my application in JDeveloper (with the option run in my ViewController-project, which means that I am not running my detail page directly in JDeveloper??) and when I open this last page, the detail form is not in create mode (I see no rows found and a create rows button).
    I have read several threads in this forum, but I do not know how to solve this problem.

    This does not work.
    In my first post I made an mistake in describing my application, it is not a table-form, but a tree-form application:
    Group 1, Table a, Layout: tree-form
    Group 2, Table b, Layout: tree-form
    Group 3, Table c, Layout: tree-form
    Group 4, Table d, Layout: form (on same page as master table c)
    If I override the executeQueryForCollection method in the ViewObjectImpl of table d I get a message ('JBO-27122: SQL-fout tijdens voorbereiding van statement' and 'java.sql.SQLException: OALL8 is in an inconsistent state').
    while clicking on the tree (with table b and c). It seems that the QueryForCollection method is being executed to early.

  • Master-detail insert records form?

    Hi,
    I want to be able to build a master-detail insert form based on a BC4J, any ideas on the easiest way of doing this?
    I tried using the Data Web Beans from the JSP Element wizards, and found it possible to build a master-detail form for viewing data based on a BC4J application, but not inserting.
    I know it is probably possible to do this by coding your own Data Web Beans but is
    there any way of doing it with the Web Beans available?
    Thanks in advance.

    If you have a ViewLink in your AppModule for the master/detail tables, then the JSP application wizard automatically creates a master/detail page for this view link. You may want to use the generated page and modify it.

  • Master-detail form (my detail is in a new canevas-- new window)

    Hello,
    I have a Master-detail form, in my detail when i select a row i want to show an other canevas that becomes a detail for this selected row. i constructed the relationship between my first detail block and my new canevas that contains the detail for the selected row. When I select a row Oracle didn't show me the deatil for this row in the other canevas, i wondered me why? because I thought the relationship between them should atomatically drive the data for the other canevas. If i 'm wong, does someone could tell me what to do to call my canevas detail.
    Master--->details(selected row become master)--->new canevas(contains details)
    the relationship is done between my first detail block and my new details block.
    Charly

    Hi,
    POST-QUERY is definitly the wrong trigger to do what you want to achieve.
    1. The usage of GO_BLOCK in POST-QUERY is not allowed and it will not work.
    2. The detail must be synchronized when navigating in the master-record, not when populating the block
    So the right trigger to do what you want to is the ON-POPULATE-DETAILS-Trigger.
    Problem on this: It will only work if you have a relation on the master-block to the detail block.
    But that's also possible even if you do not have a "direct" relation between the master and the detail block.
    Just create a relation between the blocks based on some dummy-item and then go to the item in the detail-block and set its property "Copy value from" to NULL.
    Now you can add your logic in the ON-POPULATE-DETAILS-Trigger.
    Still one problem left: Where is the window you're going to show placed? If it's on to of the window where the items from the master-block are displayed, then immediately after querying the records in the detail-block the navigation back to the master-block will cause the other window to be shown again (and therefore your detail-window to be hidden again).
    hope this helps

  • How to set up a master/detail Spry select

    Hello, I was trying to build a master/detail select using Spry following the example in the samples folder, but I didn't succed. I think I'm pretty close. I'm using two datasets from two diffrent xml files. The problem is that I don't know how to set a filter probably. Thanks so much.
    This is my code:
    <script type="text/javascript">
    <!--
    var dsRubro = new Spry.Data.XMLDataSet("rubro_xml.php", "root/row");
    dsRubro.setColumnType("idConsultaRubro", "number");
    var dsCategoria = new Spry.Data.XMLDataSet("categoria_xml.php", "root/row");
    dsCategoria.setColumnType("idConsultaRubro", "number");
    dsCategoria.setColumnType("idConsultaCategoria", "number");
    dsCategoria.setColumnType("orden", "number");
    //-->
    </script>
    </head>
    <body>
    <form>
    Rubro:
    <span spry:region="dsRubro" id="rubroSelector">
    <select spry:repeatchildren="dsRubro" name="rubroSelect" onchange="document.forms[0].categoriaSelect.disabled = true; dsRubro.setCurrentRowNumber(this.selectedIndex);">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}" value="{idConsultaRubro}" selected="selected">{descripcion}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}" value="{idConsultaRubro}">{descripcion}</option>
    </select>
    </span>
    Categoria:
    <span spry:region="dsCategoria" id="categoriaSelector">
    <select spry:repeatchildren="dsCategoria" id="categoriaSelect" name="categoriaSelect">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}" value="{idConsultaCategoria}" selected="selected">{descripcion}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}" value="{idConsultaCategoria}">{descripcion}</option>
    </select>
    </span>

    Use XPath to filter the data in the second dataset as follows
    <!DOCTYPE html>
    <html xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script>
    var dsRubro = new Spry.Data.XMLDataSet("rubro_xml.php", "root/row");
    dsRubro.setColumnType("idConsultaRubro", "number");
    var dsCategoria = new Spry.Data.XMLDataSet("categoria_xml.php[idConsultaRubro=-1]", "root/row");
    dsCategoria.setColumnType("idConsultaRubro", "number");
    dsCategoria.setColumnType("idConsultaCategoria", "number");
    dsCategoria.setColumnType("orden", "number");
    function newXPath(cat){
        dsCategoria.setXPath('root/row[idConsultaRubro='+cat+']');
        dsCategoria.loadData();
    </script>
    </head>
    <body>
    <form>
    Rubro:
    <span spry:region="dsRubro" id="rubroSelector">
    <select spry:repeatchildren="dsRubro" name="rubroSelect"  onchange="newXPath(this.value)">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}" value="{idConsultaRubro}" selected="selected">{descripcion}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}" value="{idConsultaRubro}">{descripcion}</option>
    </select>
    </span>
    Categoria:
    <span spry:region="dsCategoria" id="categoriaSelector">
    <select spry:repeatchildren="dsCategoria" id="categoriaSelect" name="categoriaSelect">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}" value="{idConsultaCategoria}" selected="selected">{descripcion}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}" value="{idConsultaCategoria}">{descripcion}</option>
    </select>
    </span>
    </body>
    </html>
    I hope this helps.
    Ben

  • Master Detail Relation

    Can I design Master detail using one block for master and display like 5 records and each of this has 10 detail records. I am not sure if I can achieve this.
    Other scenario is have one master block(5 records) and have 5 detail blocks. Please give any information related

    Husna,
    1. To only show 5 reords in teh master block, just set the display record property to 5 (records displayed). Selecting one of teh master records queries the detail records (as many as there are available)
    2. Master/Detail navigation works only for the current selected master record. i get th eimpression that you want to show all detail records that belong to the five master records currently visible. If this is the case then I would'nt use a master-detail relation in Forms, but read the PK from the block record and set it as the where clause to one of the detail blocks.
    Frank

  • Problem when trying to add a master-detail

    Hi all.
    I have customize a list in sharepoint with infopath.
    Now I want to add the master detail to this form.
    If I add a Web Part, from the list, no problems... I can create a filter between them and the master details works perfect. The problem of this is that I have an infopath form for the master and a 'sharepoint list' desing for the detail, and is not very
    good looking.
    So, what I want is to add for the detail, another infopath form, but I not able to.
    I have added a web part - category form - Infopath form web part but I'm not able to add the filter condition and get only the detail related to the master.
    Please help me!
    Thanks a lot in advance

    Hi pabivil,
    According to your description, my understanding is that you want to connect an InfoPath form web part to a list in SharePoint 2010.
    To achieve it, you can add a button then create a rule based on the button to send data to web part in the InfoPath form like the screenshot. After that, when you add the InfoPath form web part and the list in the same page,  the list can get the filter
    param from the InfoPath form.
    More information:
    http://office.microsoft.com/en-001/sharepoint-help/use-the-infopath-form-web-part-HA102770988.aspx
    http://sharepoint.stackexchange.com/questions/61118/infopath-form-web-part-connection-to-a-list-view-web-part
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Populate row of master detail form with selection from LOV?

    Hi Guys,
    Total noobe, Hope you can help me out with a project I am working on in Oracle Apex 4.1 with 11g XE
    I am sure this is a simple enough issue but I just can’t see the solution.
    I have a table called ‘STOCK’ this contains all new parts and delivery details.
    ‘STOCK_ID’ NUMBER PK
    ‘DELIVERY DATE ‘ DATE
    ‘PART’ VARCHAR2
    ‘PART_SN’ VARCHAR2
    ‘PART_AN’ VARCHAR2
    ‘INSTALLED’ CHECKBOX
    I have a table that list all the current physical locations of hardware for example
    ID, Till number, store location etc…
    I have an table to list the devices and modification to the hardware in these store locations.
    Move Date, Device, Device Serial number, Device Asset Number, Comments
    I have a report & form that displays all the current physical locations of hardware and a master detail form linked to this to add devices and modifications to each store location.
    I have a LOV setup on the Devices column that is based on a simple select query
    SELECT PART from STOCK
    ORDER BY 1
    This provides me the list of parts in the stock table.
    What I need to figure out is how do I get the data from the ‘STOCK’ table when I select a part in the LOV to auto populate ‘DEVICE_SN’ ‘DEVICE_AN’ in my master detail tubular form. this information is contained in the 'PART_SN' & 'PART_AN' columns of the STOCK table.
    I also need to figure out how to identify the part because by default the LOV only displays one column and I have no idea which part I am selecting other than by name. i could use a popup LOV and scan a barcode into the search box and get the retuen value to display the part name in the field.
    I also would like to reduce the number of records displayed in the LOV by using the ‘INSTALLED’ checkbox i.e. if checked this part has been used and will not be available for selection. The ‘PART_SN’ field can be duplicated as we often get the same part back again as a replacement after repair but this should be valaditated against i.e if the parts is ticked as installed and not available for selection in the list it can be added again this could possibly be validated based on the ‘DELIVERY DATE‘?
    I hope this make some sense to you guys if you need any further details let me know.
    Cheers
    Darren

    Hi,
    I am from the Oracle Forms background too and I have been using Oracle Apex for a while. Oracle Forms is just like client-server application although it uses the Forms servlet to render its Web front-end. I think...if you're really trying to develop true-Web application, you should try to forget such features as "master with many details" in Oracle Forms. Loading all the details in a single page will cause overheads anyway. When you discover more about ajax and such third-party javascript libraries as jquery and mootools, you'll have a different mind of Web development.
    Thanks.
    Andy

  • To attach a RTF template(Report for printing ) in the master detail form

    I have an application in which I have 3  master detail forms  of which one of the form is a gate pass form . Now this gate pass form has a report region as the detail.
    All that i need help is to print the Gate Pass with few fields as information in the gate pass form , where an image or picture of the visitor is also a filed .
    Now I have created an RTF Template  which is the Gate pass layout with the pic.
    So ultimately I have the application for the gate pass form and the RTF template ready with me .. Fixing this template with the application with a BUTTON called PRINT is the challenge am facing !
    SELECT XVH.GPDATE
           , TO_CHAR(XVH.VISITORTIMEIN, 'HH:MI') VISITORTIMEIN --, (XVH.VISITORTIMEIN )
           , (TO_CHAR(XVH.VISITORTIMEOUT, 'HH:MI'))VISITORTIMEOUT
           , XVH.VISITOR_NAME --, = XVH.PERSON_ID
           , XVH.COMAPANY_NAME
           , XVH.PURPOSE_OF_VISIT
           , (SELECT A.FULL_NAME
                FROM PER_ALL_PEOPLE_F A
               WHERE A.PERSON_ID = XVH.PERSON_ID
                 AND SYSDATE BETWEEN A.EFFECTIVE_START_DATE AND A.EFFECTIVE_END_DATE) To_meet
           , XVH.VISITOR_PHONE
           ,APPS.GETBASE64 (XVH.VISITOR_PHOTO)
      FROM xxcdot.XXBCT_VGPF_HEADER XVH
    WHERE XVH.GP_HEADER_ID =  :P_HEADER_ID
    This is the query for the template ..
    Please help me with this. I am very new to apex and learning it with help of online tut

    Pars I need another Help
    I am working with a master detail form where in the form region i have a Radio group . Lets say the Radio group is
    o Returnable
    o Non Returnable
    o Other
    so when i select Non returnable I want a particular column called
    Line Status to get Disabled .
    I have done that by a dynamic action - using jquery statement (.Disable) .
    Defining the element attributes as Disable .
    Now the problem is that ,, Line status is getting disabled on the selection of Non returnable radio button. but unless and until i dont press the Add row button it does not work ,, else i will have to switch over between the radio buttons to get this action done !!

  • Adding button to report to link to master detail form

    I want to add a button to a report to direct me to a blank master detail form to insert a new record. I have used the following code in the additional PL/SQL code section:
    htp.formopen('PORTAL30.wwa_app_module.new_instance?p_moduleid=1271601405');
    htp.formsubmit('p_request','Create New');
    htp.formClose;
    When I click this I get 'Page Not Found'.
    But if I hit refresh I am directed to the correct form with the same url.
    Any ideas on what the issue is?
    Thanks.

    Hi,
    Check this sample code.
    tables:sscrfields. "Fields on selection screens
    selection-screen function key 1.
    selection-screen function key 2.
    Initialization.
      sscrfields-functxt_01 = 'Report'.
      sscrfields-functxt_02 = 'Exit'.
    at selection-screen.
       if sscrfields-ucomm = 'FC01'.
      perform f_alv_sub.
       elseif sscrfields-ucomm = 'FC02'.
       endif.
    Hope it helps.

  • Parameter on Master Detail Form

    How do I set a bind variable in a Master Detail Form?

    I suspect that he may have the same question I do. Namely, if I have four tables (employees, projects, tasks, and project_assignments) how do I create a master detail form where I can specify the project and the employee via LOVs? The project_assignments table contains foreign keys for employee, project, and task, as well as additional fields relating to the task status.
    Currently, I have it set up so that the employee name can be selected and the project is hard coded to the current project.
    Is there an easy way to populate the detail records based on two LOVs in the master form?
    Thanks in advance,
    Fritz

  • Requerying on Master Detail form

    Hi,
    Does anyone know how to set up PL/SQL code to automatically requery on a master detail form after insert/update? For example, if I insert a record on the master part of the form, I would like that record to automatically show up after the insert/update. Also, if I insert a record on the detail part of the form, I would like that record to automatically show up after an insert/update.
    Thanks,
    Martin

    Hi Krishnamurthy,
    Thank you very much for the code. The code for the most part acts like I want it to except when I initally insert a master record. In my case, I have the form set up so you have to insert a master record before you can insert any detail records. Therefore, after the user clicks save, that master record needs to come up. The code you gave me only brings up the current master record if you are inserting detail records (which is great, that is what I want it to do). I have modified the code you gave me so when a user is just inserting the master record, the master record automaticaly comes up rather than the first record in the table. However my code makes the form run slow (about 13 seconds to save). Do you know of another way that I can make the form act like I want it to. Below is my code.
    Thanks again,
    Martin
    declare
         l_msg                varchar2(255);
         l_key_value      number(10);
         l_key_value2      number(10);
         v_get_id           number(9);
         v_check_detail      number(9);
         CURSOR GET_ID IS
              SELECT MAX(A.PCH_ID)
              FROM PORTAL30.PCHEADER A;
         CURSOR CHECK_DETAILS IS
              SELECT DISTINCT B.PCD_ID
              FROM PORTAL30.PCDETAILS B WHERE B.PCD_PHC_ID = v_get_id;
    begin
         /*get the key field value from the Master Detail form to requery the details since the form will be cleared out after update */
         l_key_value := p_session.get_value_as_NUMBER(
         p_block_name => 'MASTER_BLOCK',
         p_attribute_name => 'A_PCH_ID',
         p_index => 1
         doSave;--- This is the default handler
         OPEN get_id;
         FETCH get_id into v_get_id;
         CLOSE get_id;
         OPEN check_details;
         FETCH check_details into v_check_detail;
    IF check_details%NOTFOUND
    THEN
         CLOSE check_details;
         /*get the key field value from the Master Detail form to requery the details since the form will
         be cleared out after update */
         l_key_value2 := v_get_id;
         /*get the message which is going to be displayed after update */
         l_msg := p_session.get_value_as_varchar2(
         p_block_name => 'MASTER_BLOCK',
         p_attribute_name => '_STATUS');
         /*now set the key field value in the Master Detail */
         p_session.set_shadow_value(p_block_name => 'MASTER_BLOCK',
         p_attribute_name => 'A_PCH_ID',
         p_value => l_key_value2,
         p_language => PORTAL30.wwctx_api.get_nls_language);
         WWV_MASTER_GENSYS_1(p_block_name => null,
         p_object_name => null,
         p_instance => null,
         p_event_type => null,
         p_user_args => null,
         p_session => p_session);
         /*put the message(like 'Updated one master record' ) back in the screen */
         p_session.set_value(p_block_name => 'MASTER_BLOCK',
         p_attribute_name => '_STATUS',
         p_value => l_msg);
         p_session.set_value
         (p_block_name => 'MASTER_BLOCK'
         ,p_attribute_name => '_MASTER_ACTION'
         ,p_value => 'NONE');
         p_session.save_session();
    ELSE
         CLOSE check_details;
         /*get the message which is going to be displayed after update*/
         l_msg := p_session.get_value_as_varchar2(
         p_block_name => 'MASTER_BLOCK',
         p_attribute_name => '_STATUS');
         /*now set the key field value in the Master Detail*/
         p_session.set_shadow_value(p_block_name => 'MASTER_BLOCK',
         p_attribute_name => 'A_PCH_ID',
         p_value => l_key_value,
         p_language => PORTAL30.wwctx_api.get_nls_language);
         WWV_MASTER_GENSYS_1(p_block_name => null,
         p_object_name => null,
         p_instance => null,
         p_event_type => null,
         p_user_args => null,
         p_session => p_session);
         /*put the message(like 'Updated one master record' ) back in the screen*/
         p_session.set_value(p_block_name => 'MASTER_BLOCK',
         p_attribute_name => '_STATUS',
         p_value => l_msg);
         p_session.save_session();
    END IF;
    END;

Maybe you are looking for

  • Eject is not working when installer asks to insert second disk

    I have a quite strange problem, when i'm installing world of warcraft on my laptop, everything goes allright for a first (of 5) dvd, it's running install till 20% and then asks to insert a second disk. When i'm trying to eject the first one it says,

  • How to stop a triggered process chain

    Hi, Does anyone know how to stop a process chain? It was accidentally triggered twice and we need to stop it. Thanks.

  • How to have a selection screen in the smartform

    Hi, <i><b>How to have a selection screen in the smartform. <u>Could anybody share with the example of driver program and the smart forms</u> . Please send me ASAP</b></i> Thanks Shiva shekar

  • Connecting a BT Hub

    I have a Mac Book Pro OSX and have been using a BT Router for about 4 years after installing the "Router Manager.app" etc using the CD supplied with the BT Router. I also now have a BT Hub at a different address, I connected the hub up, clicked on th

  • ***How to call BSP App when custom button event fired from toolbar group***

    Dear PCUI Experts,    I have created one custom button for the transaction CRMD_BUS2000116. And my urgnet requirement is , I need to call BSP application which is used to   take data from custom fields and stores into BP table. How to call the BSP Ap