2 Replies Latest reply: May 28, 2014 11:35 AM by 1010306 RSS

    Nested overflow

    Bill Symoniak

      Problems attempting nested overflow using version 11.4.


      Form ABC has a variable being populated with a company name.  Below this variable is a list of employees and the employee information.  Each employee’s information is one print line and can occur from 1 to n times.  XML is our standard for input file format.


      We utilize overflow coding to trigger the employee’s information section multiple times.  We code the overflow symbol on the variable in the XDD, have the INCOVSYM rule on the section, and utilize CountRec of the path containing the employee information on the DAL trigger.  For one transaction, we trigger the section on form ABC and this works perfectly.


      Our need is to trigger form ABC 1 to n times or have the next occurrence of the Company information start a new page, with the company name and employee’s information varying on each “version” of form ABC or page – within one transaction.  It must be within one transaction because we are using intelligent insert barcoding for each transaction.  We want the following:


      1st version form ABC           Company A information

                                                                  Company A Employee 1 information

                                                                  Company A Employee 2 information

                                                                  . . .

                                                                  Company A Employee n information


      2nd version form ABC          Company B information

      (or start new page)                           Company B Employee 1 information

                                                                  Company B Employee 2 information

                                                                  . . .

                                                                  Company B Employee n information


      The above appears to need overflow coding for each Company and overflow coding for the employees in a Company.


      We can find rules and functions for nested overflow in the documentation, but nothing to explain the “how” to implement nested overflow.  We’ve simplified the above to not start a new page/form ABC trigger and just have Employee information overflow within the overflow Company information using the rules and functions with no success.

        • 1. Re: Nested overflow

          I presume you are asking how to compose the XPath statement to retrieve your overflow within overflow data. Here is something from the help file (Rules.CHM) that might be useful.


          Overflow in XML

          Here is how overflow works in XML. First, the system scans the search text to see if a replacement is needed for the overflow value. Here is one approach:


          The system inserts the current overflow value, then performs the actual XML search for the requested XPath.

          With the following approach, you can omit the use of @GETRECSUSED to declare which overflow variable to use and instead include the overflow name directly into the XPath, as shown here:


          This method lets you support overflow within overflow.

          Be aware that with either method, you still have to declare and use the overflow variables. The difference is that for the second method [**OverFlowSymbol**], the form name has to be XML , while for the first example [****], the form name is the actual name of the image for which you created the overflow symbol.

          Also, remember to include the IncOvSym rules at the image level in the DDT file to increment the values to the next index. When doing overflow within overflow, you may also have to include an additional dummy image to do the IncOvSym for the symbol that represents the outer-most loop index.

          Interpreting this, it means that in 11.4, you have to declare your overflow variables - which you may already be doing - in the JDT. Something like this:





          Then in your XPath, you would write the statement something like this:




          Now, each time you increment Parent, you reset Child back to 1 so that the indexing of the new children begins with the first one again.

          • 2. Re: Nested overflow

            You can go for subform concept, which will automatically take care of nested overflow.


            Add only the sections which need to be repeated inside a form, then add the form as a subform inside the form



            Provide manual trigger for the subform with "!/Forms/Form/Car" in search mask(counter) and occurence mask as1.


            For fields inside section under rule tab give "overflow multiplier" as 1 and "Overflow" as section.


            For using subform you need to make the below changes in afgjob.jdt


            You have to add Runtriggers rule and comment (loadrrcptbl & Runsetrcptbl)






            Please revert me if you need further explanations