10 Replies Latest reply on Feb 4, 2010 9:59 AM by jp2010*

    Please Help ...Subforms


      Can anyone please help... I am about to give up?


      Attached is a working org file that works great.  I want the same thing to happen in my other form project setup on page 2.


      I want the working or section to be available under the task row section and then again under the working org section.


      When I add the working org subreports, I cannot get the detail section to work properly in the new report.


      Any help would ber greatly appreciated!


      Thank you

        • 1. Re: Please Help ...Subforms
          Kevin Cavallo Level 4

          Check out the attached Setup Form.pdf.  I think it's what you want.


          Based on your explanation, it sounds like you always want a Working Org section, regardless of whether the answer is yes or no.  If the answer is yes we just need to insert a tasks section.  Is this correct?


          What I did was copy the System Selection and System Detail parts of the second form and pasted them under the existing working org row.  I removed the other working org section from under the tasks row since it's redundant.  I changed the question selection event handler to make the tasks row visible if yes is selected, otherwise make it hidden.  The working org row is always set to visible.


          I also fixed the calculation script for the total under each System Detail.


          If I'm not correct in what you were looking for, at least you have a working example to use. You can modify the handling of the System Detail selection if you need to.

          1 person found this helpful
          • 2. Re: Please Help ...Subforms
            jp2010* Level 1



            Thank you so much.  Couple more questions.  I tried adding an Add Task button by using the same idea as the add phase button.

            I want the same fields to appear as when the quesion is Does this phase have tasks to appear is answered yes


            I cannot figure out what I am doing wrong.  I have tried using the Action builder to add the button or just the same logic as the add phase button.


            Also when I add more than three phases the add phase button disappears.  How can I get this form to grow on and on.


            Thanks so much, I really appreciate it!

            • 3. Re: Please Help ...Subforms
              Kevin Cavallo Level 4

              See attached.


              The phase button disappears because your Page 2 subform is set to Positioned content.  Because of that, anything that gets pushed past the end of the page will not move to the top of the next page; things always try to stay where you drop them in Designer.  I changed the page content to Flowed (Object/Subform tab, Content dropdown).  This will cause objects to be layed out one-after-another, and they will overflow to the next page.


              The Add Task button issue is due to the location of the button. Each phase that you add is a separate instance of an EmpProjInfoRow, and the tasks are in a table under that row instance.  Since the Add Task button resides outside of the EmpProjInfoRow, it will not know which phase instance to use to add a task row.  I moved the Add Task button underneath the TasksRow, inside the TasksSubform.  That way the button will not be visible until the user indicates that tasks are required and the TasksRow is made visible.  Then, each time the Add Tasks button is pressed it adds a new instance of Table2, which contains the actual task row data.  The whole thing is associated with the EmpProjInfoRow instance that contains it.


              Finally, since you can add multiple task rows, there needs to be a way to remove them too.  I added a remove button to each task row that removes the instance of that row when clicked.

              1 person found this helpful
              • 4. Re: Please Help ...Subforms
                jp2010* Level 1



                Thank you ... you are awesome. One more question, if I may.  It makes sense to me that the add task button should be in the task section.  My issue now is that the task and the working org section need to stay together.  So instead of adding the next task underneath the last task, I would like it to be under the working org section.  Is what I am trying to do possible?  Attached is a screen shot of how I would like it to appear.


                Again thanks so much you are a life saver!!

                • 5. Re: Please Help ...Subforms
                  jp2010* Level 1

                  Ok I almost have my first form completed (Only 1 week behind schedule).  I figured out how to get all the correct sections to display and repeat at the right time.


                  One more question, if anyone could help I would greatly appreciate it! I have an add and delete button on the same row.  However, when I use the delete button it does not delete the current row.  It seems to delete the the row above it.


                  Thanks so much

                  • 6. Re: Please Help ...Subforms
                    Kevin Cavallo Level 4

                    Looks like you answered your last question before I got back to you.


                    Post the current form and we'll take a look at the delete issue.

                    • 7. Re: Please Help ...Subforms
                      jp2010* Level 1

                      Ok... here are my questions


                      Under the WorkingOrgRow2 when I populate the working org for say 3 rows and then hit the delete button on that row.  It does not delete that instance, but either one above or below.


                      Same thing happens under Working.Row1  Also under that section the table grows towards the top and not how I would expect it look.


                      Also if you have any suggestions on the alignment of the TasksRown and Working.  I cannot seem to get them to line up at the left hand side of the page or have columns that match in width.


                      P.S.   ... Is there a way for the tab order to follow between pages?  For example on tab order 92 I would like the next field to be tab order 1 on page 2.


                      Thanks again!

                      • 8. Re: Please Help ...Subforms
                        Kevin Cavallo Level 4

                        1. Your reference under the remove button is referencing "this.parent".  The parent is Subform4, which contains the buttons but does not have multiple instances.  You want to reference the instance of WorkingOrgRow2, which is what you're adding each time you click add. Change your script to:

                        this.resolveNode('WorkingOrgSect._WorkingOrgRow2').removeInstance(this.parent.parent.index );

                        This will reference the instance of WorkingOrgRow2 that contains the button that you've clicked and pass the correct index to removeInstance.


                        2. Same issue and fix as above.


                        3. Table growth issue:  This is due to the paragraph vertical alignment setting on the subforms that hold the tables.  They are set to align:middle so that it tries to center the whole table vertically in the subform.  Change the vertical alignment on TasksSubform and Working/Subform3 to align:top.


                        4. Horizontal issue:  Sort of the same as #3: the horizontal alignment for Working/Subform3 is set to center.  Change it to align:left and the table should shift to the left margin.  To make the column widths equal, I find it easiest to match the widths of of each cell by copying the actual width value manually, rather than dragging edges.  For example, select the upper row Working Org cell and copy the value from the Layout tab's Width field.  Then highlight the lower row's Working Org cell and paste that value into the Width field.  Repeat for the remainder of the cells in the rows so that they all match.


                        Sorry, can't anser the tab sequence question.

                        • 9. Re: Please Help ...Subforms
                          jp2010* Level 1



                          Thanks so much.  I was just about to send it out and discovered an issue with the task row.  It is the same as the one below with it deleting the wrong instance.


                          I changed the script to:



                          But nothing happens.  It is the Button3 under Row1


                          Any ideas?  Thanks!

                          • 10. Re: Please Help ...Subforms
                            jp2010* Level 1



                            I got the form to work correctly, thanks so much for all your help!