2 table rows - one "Add Row" button

I am a novice, not alot of training with javascript.
I need 2 table rows added to a table without having multiple "add row" buttons. I would like to be able to add both rows with one button.
right now the button is set for the most current row:
Table1._Week.addInstance(0);
the row above is Table1._Codes
How do I script this in order to have both rows appear when the Add Row button is selected?

Hi,
A couple of things without benefit of seeing the form.
Are the repeating rows called:
'Week' / 'Codes'?
OR
'_Week' / '_Codes'?
The underscore '_' is shorthand for instanceManager, which is used to call the addInstance. If I assure that the repeating rows are just 'Week' / 'Codes' then the following javascript in the click event of the button should work:
Table1._Week.addInstance(true);
Table1._Codes.addinstance(true);
This should add a row to each repeating row in one button.
Please note that the parameter for the addInstance is either 0 (false) or 1 (true), which relates to whether the row will be data merged with the form.
Hope that helps,
Niall
hmmm, see you have another thread on this: add multiple rows with add a row button ???

Similar Messages

  • How to create editable table with one empty row ?

    I'm looking for solution how to create editable table with one empty row using ADF BC. I have seen this solution in application that was created in JHeadstart and it's very well idea to use it insead of creation form.

    hammm, i do it this:
    drop the VO on the page, select Table->ADF Table....
    so, drop the botton create, from de VO->operations->create (the firts), and right botton (mouse) Edit binding....
    in Data collection select the VO, in Select an action select CreateInsert
    luck

  • Advance Table: Problem on add another button

    Hello All,
    I have designed page that contains advance table and add another button. The table displays maximum 10 records in a page.
    First I click the button and enter the records. After that again I click the button for multiple records insert. Than the previous record goes to another page. In this case users are unable to see the previous record. In my question how can we prevent that one?
    Please help me…
    Thanks in advance…
    -- Subhas

    It is a Standard behaviour that table will show the records which are set in the max number of records displayed property.
    However if you want that records shudn't get shifted each time you press the add another row button you can set the max number of records programatically and increment 1 to it.
    This way the number of records displayed will be now 11.
    like each time you press add another row redirect the page, grab the table bean and then
    bean.setmaxnumberofrecords()
    increment the original value by 1 and then set.
    Thanks,
    Gaurav Sharma

  • How to save multiple tables on one single save button in JDeveloper.

    hi all,
    i have two tables on a JSF page.
    the parent and child tables has 1 to many relationship.
    its like for department id i have many employee_id's.
    in my scenario ,
    i have to give values to both parent and child tables at a time on one single click on add button. and after clicking on one single save button i should be able to commit the data into database for both the tables at a time.
    its similar like a hire a person in fusion applications , when you clinked on hire person. all the related tables populated to give data and on one single save committing data to database.
    please help in this. and its my urgent requirement for my application design.
    am beginner to the J Developer Tool and ADF.
    regards,
    M vijayalakshmi.

    I assume you are using ADF BC as your business components. Now if both your Master and Chail VO are instances of the same AM, the commit operation of the AM will take care of it. You just have to drag and drop the commit operation as a Save button in your page

  • How to add one button at top of table that creates new rows each time a user clicks on it?

    In the help guide, there is an example of adding buttons to each row - an Add Row and Delete Row button.  I am interested in having one button at the top of the table that can add rows. 

    Hi,
    You can create a table with a header row, where you can place your add button in one of its cells.
    Then you need a script to create a new row in the buttons click event. In a table named 'Table1' with a row named 'Row1' it looks this way:
    Table1._Row1.addInstance()

  • Issues with Advance Table Add Row New Row not work in some scenarios.

    Hi,
    Wondering if there's any issue with Advanced Tables where it does not create any rows. I don't know if anyone tried this or not. I have one OA Page with Advanced Table and a button that when clicked open a new OA Page in a POP-UP Window. The pop-up page conatins one textbox where u enter a data and this gets saved in one of the VO's transient attribute. Now on the ase page if you don't click a button to open a pop-up page you can Add New Rows in the Advanced Table by clicking Add Row Button. But as soon as you open a popup window and close it Add New Rows button doesn't work and is not creating any new rows. Basically page stops working. Both the POP-UP and the base page share the same AM but have different controllers.
    POP-UP page is a custom page that I open giving the Destination URI value in the button item and target frame _blank.
    I even tried creating rows programmatically for Advance Table but this too doesn't work once u open a pop-up. Also I have used pageContext.putTransactionValue in the pop-up page and am checking and removing this in the base page.
    Any help is appreciated.
    Thanks

    anyone

  • Add Row in Advanced table

    Hi,
    I need to create a row while click on the button Add Another in a table.
    Can any body help on this.
    Regards,
    Eswar

    Hi Eswar,
    You can achieve this through declarative approach or else through coding.
    Here are two ways i am suggesting. you can use any of them.
    For creating a new row in advancedTable you have two options.
    First is to right click on advancedTable-->New-->footer
    Now right click on tableFooter1-->New-->addTableRow
    Set the following properties for addTableRow1
    Add Rows Label : Add Row
    Rows to Add : 1
    Insert rows automatically : True
    Second option is you create a submit button and in pfr method of controller use below code.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("ID of Add Row Submit Button") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("VO Instance Name");
    if(vo != null)
    vo.last();
    vo.next();
    Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState((byte)-1);
    Regards,
    Palepu

  • Manual tabular form -- add rows

    Hi everybody, I am making a manually tabular form following the Denes Kubicek tutorials:
    http://apex.oracle.com/pls/otn/f?p=31517:170:1304244099066416::NO
    and
    http://apex.oracle.com/pls/otn/f?p=31517:190:1304244099066416::NO
    The SQL for the tabular form is:
    SELECT apex_item.checkbox (31,
    idint,
    'onclick="highlight_row(this,' || ROWNUM || ')"',
    NULL,
    'f31_' || LPAD (ROWNUM, 4, '0')
    ) delete_checkbox,
    idint,
    apex_item.text (32,
    tipus_modif,
    1,
    1,
    'style="width:20px" ',
    'f32_' || LPAD (ROWNUM, 4, '0')
    ) tipus
    FROM GPPC_DETALLS_ESMENA_PROP_V
    where esmena_idint = :P18_IDINT
    and tipus_modif ='A'
    The Report is created correct. Now I modify the "Form Region" template like this:
    <table class="t6FormRegion" id="MY_TAB" border="0" cellpadding="0" #REGION_ATTRIBUTES# summary="">
    <tr><td class="t6Header">#TITLE#</td></tr>
    <tr><td class="t6ButtonHolder">#CLOSE#   #PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</td></tr>
    <tr><td class="t6Body">#BODY#</td></tr>
    <tr><td><img src="#IMAGE_PREFIX#themes/theme_6/t.gif" width="400" height="1" alt="" /></td></tr>
    </table>
    Now I add a Button URL with the code:
    javascript:va_AddTableRow(this,'MY_TAB',1);
    and add this Javascript in the region header of the SQL Report
    <script>
    function va_AddTableRow(pThis,pThat,pNum){
    var tt = html_GetElement(pThat);
    for(i=0;i<pNum;i++){
    var ogTR = tt.rows[1];
    var trClone = ogTR.cloneNode(true);
    trClone.firstChild.innerHTML='(null)';
    var last_child=trClone.lastChild.getElementsByTagName('input')
    for (var j=0;j<last_child.length;j++)
    if (last_child[j].type=="hidden" && last_child[j].name=="f01")
    last_child[j].value="";
    if(document.all){
    myNewRow = tt.insertRow(tt.rows.length);
    oReplace = myNewRow.replaceNode(trClone);
    }else{
    tt.appendChild(trClone);
    </script>
    In this moment, when I push the botton appears the text (nulll) in the same region but not as a new line in the SQL report, what is the problem??
    Thank you for your help

    Alberto,
    When you get a chance, see if maybe this (old version) of my app does something similar to what you need/want.
    [http://apex.oracle.com/pls/otn/f?p=26115:3]
    It's not working right now though, I keep getting the Oracle error:
    ORA-01116: error in opening database file 17252 ORA-01110: data file 17252: '/u03/oradata/marvlprd/MARVLPRD/datafile/o1_mf_flow_172_23qtsjpr_.dbf' ORA-27041: unable to open file Linux Error: 23: Too many open files in system Additional information: 3
    So, as way of an explanation (until Joel gets the Linux process fixed), I have a simple little screen that I use for letting the users specifiy search criteria. Each line has four columns, what field they want to search, a condition (equals or not equals), the text to search for, and an optional 'And/or' argument. If the 'And/Or' gets populated, a new blank line automatically gets created. There is also a red 'X' on each line so they users can delete a line if they want.
    Not sure if this is what you need, but this page uses the same set of javascript code, so perhaps when it's working again, you can see if there are any similarities or differences.
    Also, for reference, so you can see the code and variables, etc., the workspace is wbfergus, and the id and password are both htmldb-apex.
    Bill Ferguson

  • Is there a way to open SSRS 2005 tree view in a table in a Details row upward?

    Hi.
    I building some reports with SSRS, and showing data in a table. The table has one Details row that forms at the end multiple rows with the tree view (+ and -).
    Is there a way to open the tree view upwards and not downwards so that the children of level 2, 3 etc come over the parent row?
    I've goggled it everywhere, but I don't seem to find the answer. If anyone could help me out, I would appreciated.
    Thanks
    Novi

    Hi again.
    And by the way, this is a parent child hierarchy. I have made a group details row with a "ParentUniqeName" on Parent Group text box and "UniqueName" on the Group On expression box by using Edit Group menu.
    In addition, there is a drill down functionality on the table.
    Now, it seems that the order of the items is correct, I just want it to have the opposite order.
    Thanks again...
    Novi

  • Advance Table - Add Row button and coloumn issue

    Hi all,
    I have created Advanced Table wth four coloumns.
    for two columns item style as messagtextinput and the rest are same as DATE.
    But when the page is rendering the table columns shows as messagestyletext , which means messagetextinput style item is not appearing.
    Kindly help me if am missed anything wrong.
    and also can u help me to create add row button featurs in advance table
    Thanks in advance.
    Senthur

    Senthur,
    I hv done this using row status initialised.I couldnt get the above lines.
    I have another doubt also. In Advanced table there is coloumn header, is there any Row header.There is nothing as such RowHeader. Let me know ur exact requirement.
    Name age salary
    empid1 xxx 21 100
    empid2 yyy 22 200Create a VO which return the above attributes and attach the same to the Adavanced Table Bean.
    Regards,
    Gyan

  • Radio button in a Table -Only one row/radio button selection to be possible

    Hi experts,
    I have a requirement from customer to have a radio button inside a table of a WebDynpro ABAP application. For example, a table containing list of mobile numbers.
    The columns has
    Mobile Model, Cost, Company name, and a radio button named choice.
    Only one record and hence one radio button can be chosen at a given time.
    When the user clicks on the radio button choice corresponding to the row of the mobile of his choice, the row should get lead selected .
    When the user chooses a different choice radio button (corresponding to another mobile) the old radio button choice should get deselected, new row and its radio button should be lead selected.
    Can you give me the code how to deselect the remaining radio buttons when a user selects on one Radio button

    Hi Sandeep ,
    Have a look at the events of table UI element and its paramaters , Here's the link.
    [Link|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2d/390e422dfcde2ce10000000a1550b0/content.htm]
    The event 'Onselect' or 'OnLeadSelect' provides 4 standard paramaters , out of which , OLD_LEAD_SELECTION/OLD_ROW_ELEMENT is one of them.
    So you could use this element and set the attribute value (Which is bound to the radio button) to abap_false.
    Although I am not sure as to which event ight trigger ( ON_LEAD_SELECT / ON_SELECT ).:)
    Thanks,
    Aditya.

  • Using Numbers 3.2, one of my tables does not allow me to add rows.

    This table does not have the "=" or "_|" symbol at the bottom, allowing me to add rows. The menu bar under Table>Add Row Above and Table>Add Row Below are both grayed out.  What can I do to add rows?
    My computer is a MacBook Pro 15", late 2013;  2.6 GHz, 16GB RAM, OSZX 10.9.3

    Hi Patrick,
    On way to experience this is if you have a filter running and some of your rows are hidden. If the is the case, just unclick the filter.
    quinn

  • How do I create an "Add Row" button (add instance with click activity)

    I've been looking through a couple of examples, but the xml is lost on me. I need to learn how to do this for myself because it'd help me out on so many forms. There're forms I just simply cannot do without this function.
    Where I get lost is the javascript linking the button to the specific table. I've been trying to use this I found in an example:
    <event activity="click"><
    script contentType="application/x-javascript">SAPS350a.Page1.TableData1.Table1.Row2.instanceManager.addInstance(1);</script></
    event>
    Now, I'm a complete newbie, so I'm sure someone can point out to me exactly what's wrong, but I dont know what "SAPS350a" means nor can I figure out where the label "TableData1" connects to.
    If anyone can explain this in a "add rows for dummies" fashion, I'd be greatly appreciative.
    See attached an example of one of the fields I need to repeat.

    Hi Liz. You shouldn't really be playing in the xml. Especially if you are a newbie . You could corrupt the whole form if you do something wrong and you probably wont be able to rectify it. Scripts must be added in the script window. In your post, the 'SAPS350a.Page1...' is the path to the row of the particular form that you copied that code from. I have added a button to your form. have a look at the script to see what i have done.

  • Weird Problem with Add Row Button in Master Detail Page

    I have a page that was created with a Master Detail Wizard. When I click the Add Row button on our Production Environment, the row counter increments BUT no blank row shows on the screen.
    In our Development Environment, when I click the Add Row button, a blank row appears as expected. Thinking there was some problem with the production app, I exported the Dev version and imported into Production. Still no blank row.
    Thinking perhaps it had something to do with the data, I copied our production application data back into the development application tables. Still, the development app creates the blank row where the production version does not.
    I even used the same browser window for both environments and still get the same results. This was working fine in production then just stopped one day.
    The only clue I have is that the Add Row WILL work if the Master Record has no details or less than a page worth. It seems to happen when the detail records are more than one page worth. Also, when I click the Add Row button, it goes to the last page of the list (say three pages of 10, 10, 6) but no blank row shows up. Again, works fine in the development environment no matter how many pages.
    Any ideas or suggestions why this is happening? Could there be some environment setting that is causing this to happen?

    I have a page that was created with a Master Detail Wizard. When I click the Add Row button on our Production Environment, the row counter increments BUT no blank row shows on the screen.
    In our Development Environment, when I click the Add Row button, a blank row appears as expected. Thinking there was some problem with the production app, I exported the Dev version and imported into Production. Still no blank row.
    Thinking perhaps it had something to do with the data, I copied our production application data back into the development application tables. Still, the development app creates the blank row where the production version does not.
    I even used the same browser window for both environments and still get the same results. This was working fine in production then just stopped one day.
    The only clue I have is that the Add Row WILL work if the Master Record has no details or less than a page worth. It seems to happen when the detail records are more than one page worth. Also, when I click the Add Row button, it goes to the last page of the list (say three pages of 10, 10, 6) but no blank row shows up. Again, works fine in the development environment no matter how many pages.
    Any ideas or suggestions why this is happening? Could there be some environment setting that is causing this to happen?

  • Add Row Button Submits

    I'm using a tabular form in a region on a larger form as an option to enter lines associated with the main form. Each time I hit the ADD ROW button it submits the page and thereby increments my PK for the main form. I may be shooting myself in the foot with the additional twist that I'm using nextval to increment my PK for the main form. But I can't imagine why this should be a problem if the ADD ROW button wasn't submitting each time I wanted to add another item to this tabular form.
    Obviously, I'm a novice at this.
    Thanks for your help -
    Alexandra

    OK, there are a variety of possible issues. I'll guess at a few by describing how the master/detail form works.
    First of all, when you create a standard m/d form, the expectation is that it will be invoked in one of two ways. The page item created for the PK controls this.
    So to set this up let's say my m/d form is on page 200, the name of the master table is STUFF and the name of the PK for the master table is STUFF_JOB_NUM. There will be an item created in page 200 for each column in STUFF, including an item P200_STUFF_JOB_NUM for the PK.
    Let's also say the detail table is MORE_STUFF with a PK called MORE_STUFF_PK. There will not be any items created on page 200 for MORE_STUFF because it will be handled as a tabular form rather than a standard form on a table.
    When page 200 is initiated from another page (via a button or other type of link) the value of P200_stuff_job_num is checked. If it is null, then it is assumed that the page will be used to add a new record to STUFF. If P200_stuff_job_num is not null, the it is assumed that the page will be used to edit the row in STUFF, or to add and/or edit rows in MORE_STUFF. There is a standard process (which in my example would be called Fetch Row from STUFF) that prefills the form if P200_stuff_job_num is not null.
    The linkage between STUFF and MORE_STUFF is assumed to be between STUFF_JOB_NUM and a field in MORE_STUFF (that should usually be indexed as a non-unique key) and that will contain the value from STUFF_JOB_NUM. Let's call this field MORE_STUFF_LINK. This column is in addition to the PK column in MORE_STUFF. The source of the region (look in the region section) for the tabular form will contain the SQL that defines what goes into the tabular table. There will be a WHERE clause in that SQL that links the tabular form rows to the master form. In my example the clause would be: WHERE MORE_STUFF_LINK = :P200_stuff_job_num.
    So the following things will be true:
    if P200_stuff_job_num is null then there will be a CREATE button at the top on the assumption that you are creating a new row. The tabular form will NOT appear on the page as there won't be any detail records yet nor any way to add them.
    if P200_stuff_job_num is not null then there will be DELETE and APPLY CHANGES buttons at the top on the assumption that you want either to delete or modify the row. ALSO, the tabular form will now appear, but it might be empty (just buttons, but no data). Now the "add row" button will add a row to the tabular table that can filled in and posted with APPLY CHANGES. If there are existing rows, they can be edited and changes saved with the APPLY CHANGES.
    ====
    (not done, but will get back later... I think I still need to explain how the page that invokes the m/d page should be set up.)

Maybe you are looking for

  • Planning file entry MDAB

    Hi All, I have a pecualir situation. We have some materials in SAP where in the planning file entry is not created for them automatically. These are semifinished goods and MRP type is PD. This are new materials and are created post go live. I have ex

  • How do i sync my iphone with a new computer without losing all of my apps

    I bought a new macbook pro and want to sync my iphone and ipad with itunes on the new computer. I don't want to lose all of my apps (photos and music are already transfered). I am pretty sure that all of the apps that I have bought are in itunes, but

  • SOAP Receiver security settings

    Hi, 1) Could you please kindly tell me what settings I need to do for the security of SOAP receiver adapter ? Should my third party install or do some setting like installin ssl if I make these settings at PI side. 2) In the soap receiver communicati

  • Can I pair two iPads using Bluetooth?

    I have an ipad2 and an iPad and would like to connect the two via Bluetooth for the purpose of playing games.  No matter what I do the two units will not find each other, even though each says it is discoverable and searching and within a meter of ea

  • Errors with the parallel port

    I am trying to communicate with a robotic arm which is attached to the parallel port.