1 2 Previous Next 15 Replies Latest reply: Jul 17, 2013 7:56 AM by Pars RSS

    Can Tabular Form Add Row button open multiple row?

    Pars

      Hi,

      i'm using apex 4.2

      I'm creating tree on page when when i'm click over any node tabular form open and display related record.

       

      Now i want, in my tabular form one column contain select list

      my requirement is when i'm click over any node the tabular form open the no. of  rows equals to the no. of entries in select list respective of each tree node.

      this is possible?

      Help appretiate.

       

      Thanks

      PARS

        • 1. Re: Can Tabular Form Add Row button open multiple row?
          pkpanda

          Create a hidden page item P1_NOOFREC

           

          put the 'f?p=&APP_ID.:1:&SESSION.::NO::P1_NOOFREC:' || NOOFREC_FIELDNAME as link column in your tree select statement

           

          create a report region with conditional display where P1_NOOFREC is not null

          also put a condition in your report sql NOOFREC = :p1_NOOFREC

           

          and set the parameter in the tree attribute

          Activate Node Link with =single/Double

          Selected node page item = p1_noofrec

          • 2. Re: Can Tabular Form Add Row button open multiple row?
            Pars

            Hi,

            thanks for reply

            already i've link from page to tabular form when i click only one row get add

            i want multiple row added as a no of entries in select list column of tabular form.

             

            regards.

            • 3. Re: Can Tabular Form Add Row button open multiple row?
              Nicolette

              Pars

               

              How is your tabular form created?

               

              If you have a wizard created tabular form.

              The use a dynamic action that fires on page load and calls the javascript function add_row for every new row that is needed.

               

              If manually and using an apex collection.

              Have a application process that adds the number of rows to the collection wirh APEX_COLLECTION.ADD_MEMBER.

               

              Another option is to add a union to your select statement in your region

              select level
              from   dual
              connect by level <= 5
              

              Where 5 is the number of empty rows that needed to be added.

               

              Nicolette

              • 4. Re: Can Tabular Form Add Row button open multiple row?
                Pars

                Hi Nicolette,

                Yes i'm creating dynamic action on page load for add row but it create only one row

                my requirement is i want multiple row, it is possible by creating manual tabular form but it add row which are null not maps parent field reference.

                by wizard method its when i'm click its automatically gives parent value

                 

                Pars

                • 5. Re: Can Tabular Form Add Row button open multiple row?
                  Nicolette

                  Pars

                  
                  
                  

                  PARS wrote:

                   

                  Hi Nicolette,

                  Yes i'm creating dynamic action on page load for add row but it create only one row

                  In your javascript are you using a loop to run add_row as many times as needed?

                  Somthing like

                  l_no_rows = apex.item('P_YOUR_ITEM').get_value();
                  for (var i=0;i<l_no_rows;i++)
                  {
                  addRow();
                  }
                  
                  

                  Where P_YOUR_ITEM is a hidden item that holds the number of rows that need to be added.

                  
                  
                  

                  PARS wrote:

                   

                  it is possible by creating manual tabular form but it add row which are null not maps parent field reference

                  If your using a manual tabular form than the default values have to be set by you the moment you create the new row.

                  So either as parameter in apex_collection.add_member or as a value in the select statement.

                   

                  Nicolette

                   

                  Message was edited by: Nicolette Corrected the code to the correct addRow() function name.

                  • 6. Re: Can Tabular Form Add Row button open multiple row?
                    Pars

                    Hi,

                    its not working Nicolette.. in by using dynamic action

                     

                    Pars

                    • 7. Re: Can Tabular Form Add Row button open multiple row?
                      VC

                      Nicolette wrote:

                       

                      Pars

                      1.  

                      PARS wrote:

                       

                      Hi Nicolette,

                      Yes i'm creating dynamic action on page load for add row but it create only one row

                      In your javascript are you using a loop to run add_row as many times as needed?

                      Somthing like

                      1. l_no_rows = apex.item('P_YOUR_ITEM').get_value; 
                      2. for (var i=0;i<l_no_rows;i++) 
                      3. add_row; 

                      Where P_YOUR_ITEM is a hidden item that holds the number of rows that need to be added.

                      1.  

                      PARS wrote:

                       

                      it is possible by creating manual tabular form but it add row which are null not maps parent field reference

                      If your using a manual tabular form than the default values have to be set by you the moment you create the new row.

                      So either as parameter in apex_collection.add_member or as a value in the select statement.

                       

                      Nicolette

                      Are you referring to apex internal add row js function? because there is nothing called add_row

                       

                      it is addRow and it should be called as below in the DA:

                      addRow();
                      
                      • 8. Re: Can Tabular Form Add Row button open multiple row?
                        Pars

                        Hi VC,

                        By using addRow(); function in DA also not works

                         

                        item P_YOUR_ITEM is 'display only' and it show values that all value shoud be displayed in tabular form

                        i.e. no of entries displays by item =no. of rows  to be added when i'm load page and select node from page

                        • 9. Re: Can Tabular Form Add Row button open multiple row?
                          Nicolette

                          Pars

                           

                          And how about debuging the javascript using your favorite browsers developer tools.

                          Any error messages?

                          Has l_no_rows have a value?

                          What is your exact javascript code?

                           

                          I will edit the original message for a more correct code.

                           

                          Nicolette

                          • 10. Re: Can Tabular Form Add Row button open multiple row?
                            Pars

                            Hi,

                            No error displays and when i'm click over add row button only one row added

                            and not displayed l_no_rows in debugg

                             

                            Pars

                            • 11. Re: Can Tabular Form Add Row button open multiple row?
                              Nicolette

                              Pars

                               

                              PARS wrote:

                               

                              Hi,

                              No error displays and when i'm click over add row button only one row added

                              So the button works but what about the dynamic action? It's common that javascript errors are hidden by the browser unless you are using some form of web developer tools. Either native to the browser or as a plugin.

                               

                              PARS wrote:

                              and not displayed l_no_rows in debugg

                               

                              Pars

                              How did you debug?

                              Debug javascript with "Apex Builder Debug" is not going to work. You have to use the developer tools of your browser to do that.

                               

                              Can you set up an example of what you have on apex.oracle.com.

                              So we can help to debug it.

                               

                              Nicolette

                              • 12. Re: Can Tabular Form Add Row button open multiple row?
                                Nicolette

                                Pars

                                 

                                I have created a demo adding multiple rows to tabular form using a dynamic action.

                                Select the number of rows in the select list and click the "add row" button.

                                See the information on the page for what I have done.

                                 

                                Nicolette

                                • 13. Re: Can Tabular Form Add Row button open multiple row?
                                  Pars

                                  Hi,

                                  thanks nicolette this show how many no. to add but it every row displays top value of select list i

                                  want 1st row show 1st value,2nd row show second value,and so on.

                                  can plz help me for that

                                   

                                  Pars

                                  • 14. Re: Can Tabular Form Add Row button open multiple row?
                                    Nicolette

                                    Pars

                                     

                                    To get you started.

                                    Instead of storing the number of rows store a string of id's separated by a delimeter in a hidden item.

                                    In the dynamic action

                                    1. Get the value from the hidden item.
                                    2. Split this string using the standard javascript string function split on the delimeter character.
                                    3. You now have a array which length is the amount of rows you want to add.
                                    4. Using your browsers developing tools find the name and id used for the input item you want to set by inspecting the html attributes generated for that input item.
                                    5. Name should be something like fXX and the id fXX_NNNN for the first row.
                                    6. If there are no existing rows shown when we add the new rows setting the value for the new rows is easy.
                                    7. We would beginning with the first row and the item would have a id like fXX_0001.
                                    8. If there are already existing rows we should first determine the row number of the first added row.
                                    9. Then it becomes simply looping through the array to set the value of the item.

                                     

                                    If you set up an example of what you have managed on your own on apex.oracle.com we can give answer that are specific for your situation.

                                     

                                    Nicolette

                                    1 2 Previous Next