Repeating Subforms Incrementally

This is going to sound kind of funky...
We have a business requirement that a repeating subform ONLY repeat in multiples of 5. The subform is a column that counts five times across a page horizontally. Our form can never have more or less than 5 columns across any page, not matter how many of the have data.
For instance, if our data should only need 8 columns to fill, the form should build 2 sets of 5 columns (which are on seperate pages). The five on the first page would be filled and the first three on the second page would be filled. That would leave to empty columns on the second page.
Here's the real kicker. Our business requirements forbid us from using JavaScript or FormCalc. We have to do it via form object settings. Does anyone have ANY ideas on how to possibly go about doing this?
Thank you so much for any help! If this is unclear or it would be easier to solve with conversation, feel free to email me.
Ryan D. Lunka
Cardinal Solutions Group
[email protected]

Ok. We actually did manage to figure it out. For reference here's what we did:
Instead of setting up the columns as one repeatable subform, we put all 5 columns on as seperate (not repeatable) items. We used the same id for all 5 of them so they auto-index themselves as (column[0], column[1], etc). Then we bound the schema to the fields in all 5 of the columns. So each field in each column had a binding to node.repeatableNode[*].whatever_value. Then the larger subform that all of those columns reside in, is set to repeatable.
LiveCycle automatically fills those "columns" one at a time because of their indexing. When it gets past five, it repeats the entire subform (which HAS to have five columns) but only fills the neccesary columns as it continues.
Ask a funky question, get a funky answer. But it works.
Ryan D. Lunka
Cardinal Solutions Group
[email protected]

Similar Messages

  • XML Schema to generate table data from a repeating subform data

    Hi All, I would like to have a check box that when checked, will hide a quotation form, and make a purchase order form visible, carrying over some of the field data from the quotation form into a new table on the Purchase order form. I've attached this form at https://workspaces.acrobat.com/?d=pqpsXx5VPi*LkMeVKrX57w if you would like to take a look. When the checkbox is unchecked, it will hid the PO form, and make the quite form visible.
    The idea behind this is that my client will create his quote and send t to his customer. Once the customer accepts the quote, he can just click a button to generate his purchase order that he will send to his supplier.
    It seems that because I've got buttons to add rows on the quote form that the problem is more complex. I would be able to do this myself if the table had a fixed number of rows and I was able to use global fields and naming each cell something different, but beacuse it's a single repeating subform, I can't seem to make it work at all.
    I understand that because its a repeating subform that I need to create an XML schema to accomplish this, but also can't figure out for the life of me how to actually create the schema. I've been reading tons of tutorials, but no clue how to apply it to my specific need. I have only been able only find info on how to bind the data source once it's been created.
    I would be forever grateful if anyone could help me out.
    Thank you!

    I've edited your form and put it here.
    Here's what I've done:
    Inserted script into your checkbox renamed Accpted that hides/shows the Purchase Order/ Sales Quotation
    I've included a scripting object with a function I wrote to transfer data from like named fields/subforms from one section to another
    Inserted a few common fields into your Purchase Order table
    What you need to do is complete the development of your Purchase Order table. Make sure the common fields between the quote and purchase tables have the same names in order to transfer the data.
    No schema necessary.
    Kyle

  • Multiple repeating SubForms binding to the same data node

    Having multiple repeating SubForms binding to the same data node : In our documents, many times we need to display information from same table in multiple locations. For example, if document displays information of Insureds on one page and information of drivers on another page, we need to create a LiveCycle document with two SubForms. Each SubForm needs to have a repeating binding to CommonInsured element in XSD.  LiveCycle Designer is not able to handle such case. We cannot have two subforms bound to the same node, ONLY in a case where repeating option is selected for data binding.
    The only way I have found out is the following Javascript
    //Get the data node from XML. You will find the code for this function in //JavaHelperFunctions library.
    // InsuredDataRepeatingSubForm is a second subform.
    //You need to manually add instances to this subform at the
    //runtime and Insured data to each instance.
    var insuArray = JavaHelperFunctions.getInsureds();
        var i=0;
        for( i=0; i<insuArray.length; i++)
           if (i>0)
    var thesubform = this.InsuredDataRepeatingSubForm.instanceManager.addInstance(i);
                  thesubform.InsuredName.rawValue = insuArray[i].fullName.value;
           else
                   this.InsuredDataRepeatingSubForm.InsuredName.rawValue = insuArray[i].fullName.value;
    Is there any way I can achieve directly using bindings since we are trying to minimize javascript that changes the layout of the form?
    Thanks in advance!

    Unfortunately not. I've spent countless hours/days trying to do the same thing. You have to use code. The form consumes all the data it can into the repeating elements until there is none left and it is not reused.
    Here's a function I wrote just for that purpose. Feel free to use it:
    function loadData(source,target){
    target.setInstances(source.count);//set the target's subform instances to match the source's
    for (var a=0;a<source.count;a++){//loop through each subform instance
      var sourceSubform=source.resolveNode(source.name.substr(1)).all.item(a);
      var targetSubform=target.resolveNode(target.name.substr(1)).all.item(a);
      for (var b=0;b<sourceSubform.nodes.length;b++){//loop through the children of each
       if (sourceSubform.nodes.item(b).className=="field" && targetSubform.resolveNode(sourceSubform.nodes.item(b).name)!=null)//check for matching fields
        if (typeof(targetSubform.resolveNode(sourceSubform.nodes.item(b).name).value.exData)=="undefined" ||
         typeof(targetSubform.resolveNode(sourceSubform.nodes.item(b).name).value.exData.body)=="undefined")
         targetSubform.resolveNode(sourceSubform.nodes.item(b).name).rawValue=sourceSubform.nodes.item(b).rawValue;
        else
         targetSubform.resolveNode(sourceSubform.nodes.item(b).name).value.exData.loadXML(sourceSubform.nodes.item(b).value.exData.saveXML(),1,1);
       if (sourceSubform.nodes.item(b).className=="instanceManager" && targetSubform.resolveNode(sourceSubform.nodes.item(b).name)!=null)//check for matching subforms
        loadData(sourceSubform.nodes.item(b),targetSubform.resolveNode(sourceSubform.nodes.item(b).name));
    Just make sure the source and target subform hierarchies are identifal, same name and all. It will recurse down the tree and transfer source fields (rich text and plain) to their sister targets.
    Kyle

  • How to Highlight Fields in a dynamically repeatable subform?

    Hi team ,
    I have Problem in highlighting the fields in a dynamically repeatable subform. Sub form will have min count = 1 and max Count =20 and subform is flow able.each subform is flow able .
    I have to check only two fields in a subform whether they are null or empty . If the fields are empty or null then i have to highlight the fields .
    Below scripting is not working as per the requirement .
    I have written the below scripting  on click event of a button.
    function Test()
    var cnt = subform1.subform2.subform3.instanceManager.count;
    for(var i =0;i <= cnt;i++)
                    var vAccnt = subform1.subform2.resolveNode("subform3["+ i +"]").txtfldAccnt.rawValue;
                    var vAmount= subform1.subform2.resolveNode("subform3["+ i +"]").txtfldAmount.rawValue;
                    if(vAccnt == "" || vAccnt == null)
                                    var vName = Page1.WorkArea.GLDistribution.sfrmGLDistribution.sfrmDistribution.txtfldGLAccnt.somExpres sion;
                                    var fieldObj = xfa.resolveNode(vName + ".ui.#textEdit.border.fill.color");
                                    fieldObj.value = "255,0,0"; 
    Please help me How i can solve this problem.

    There is a space in the expression "somExpres sion".
    Just remove the space and try. I don't see any other problem in your logic.
    -Nith

  • Passing field data from a repeating subform to another repeating form

    Hi all,
    In my main form, I have a repeating subform which captures various customer demographics. It repeats up to 7 instances based on how many clients are associated to a particular account.
    The form user clicks a button to add new instances then fills in the various fields.
    What I have currently is another hidden subform which I need to then make visible, but I also need one new instance of that form, prefilled with selected fields, for each instance of the first subform.
    I'm not sure how to go about doing this. Based on my searches, it appears I need some sort of script to resolve each node and associate it with the second subform instances but I'm really unclear how to do that.
    Any advice will be greatly appreciated! TIA

    Hi all,
    I thought I found what I was looking for but still having problems getting it to work. Found this example on John Brinkman's blog...
    var srcFields = Subform1.resolveNodes("$.#field[*]");
    for (var i = 0; i < srcFields.length; i++) {
      var fieldName = srcFields.item(i).name;
      // if the same-named field exists in S2…
      if (Subform2.nodes.namedItem(fieldName)) {
         Subform2[fieldName].rawValue = srcFields.item(i).rawValue;
    I created a simple form containing 2 flowed subforms, each with one text field (same name). I added a button to subform1 to add one instance of subform1 on each click. I placed the script above in the change event of the text field in subform1.
    Nothing is happening at all in subform2. I can add my 3 instances, enter a name in the text field but nothing shows up in the text field of subform2.
    Can anyone offer any suggestions? Very new to this stuff so I'm really at a standstill. TIA!

  • Populate drop-down list in table row or repeating subform

    I am currently working on an Adobe Interactive Form integrated with web dynpro ABAP.  I would like to create a table or repeating subform with a number of drop-down lists populated from SAP.
    I am using the Enumerated Drop-down list from the WebDynproNative menu.  In my WDDOINIT method, I am populating the attributes using the set_attribute_value_set method.  This is working fine when my dropdown is not in a table or repeating subform.  The dropdown is populated and the selected value is returned to SAP when submitting the form.  However, when I place the dropdown in a table row or a repeating subform, the dropdown is not populated.
    Any ideas or suggestions?

    Hi There,
    I am facing problem in Dropdown lists in Subforms.
    I want the region dropdown list values according to country (only for DE) dropdown list value. Both Dropdown lists are in a Subform.
    For that, I have used this in EXIT event of Country Dropdown list:
    if (this.rawValue == "DE Deutschland")
    data.Item.IT_ITEM.DATA.ZZ_REGION.clearItems();
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Schleswig-Holstein","1");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Hamburg","2");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Niedersachsen","3);
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Bremen","4");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Nordrhein-Westfalen","5");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Hessen","6");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Rheinland-Pfalz","7");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Baden-Württemberg","8");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Bayern","9");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Saarland","10");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Berlin","11");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Brandenburg","12");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Mecklenburg-Vorpomme","13");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Sachsen","14");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Sachsen-Anhalt","15");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Thüringen","16");
    else
    data.Item.IT_ITEM.DATA.ZZ_REGION.clearItems();
    It does only change first region dropdownlist value, not others because both dropdown lists are in a Subform.
    Other problem is that it works only when All Country Dropdown lists are "DE". Means, first region dropdown list depends upon not only first country dropdown but also other dropdown.
    My requirement is, If first country Dropdown is "DE", only first Region Dropdown list should be fill, not others. And so on.
    Please provide solution that How can I change all dropdown lists of a Subform dynamically?
    Waiting for reply.
    Thank you
    Chandler Bing

  • Assigning values to repeating subforms using a script

    I am using a script to add values to a repeating subform. Below is a simple example. In the real script I would use a loop to do the inserts.
    //declare XML structure
    String hrxdproot = /process_data/hrxfaform/object/data/xdp/datasets/data/form1";
    //assigning repeating subform number
    int i = 1;
    //assign a value to the first repeating subform
    patExecContext.setProcessDataStringValue(hrxdproot + "/Details[" + i +"]/employee_name", "Aditya");
    However, the error I get is
    "Target exception: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. "
    I also tried to use a SetValue module to perform the same function and got the above error.
    /process_data/hrxfaform/object/data/xdp/datasets/data/form1/Details[1]/employee_name = "Aditya"
    Finally, I manually merged a sample xml (with 2 instances of the repeating subform) with the pdf and it worked fine. So I don't think there is a problem in the XML.
    Can someone please help...
    Aditya

    But the question is wether or not you're going to dynamically add nodes to your structure. Even if the schema permits to have multiple nodes under a specific section, it's hard to use xPath to do that. For example if you have a structure like the following:
    <Root>
      <Node1/>
    </Root>
    and use the following xPath /process_data/xmlvar/Root/Node1/Child1, you're going to end up with the following:
    <Root>
      <Node1>
          <Child1>
       </Node1>
    </Root>
    Now if you try to add another node under child node with a similar xPath /process_data/xmlvar/Root/Node1/Child2, you're going to end up with the following:
    <Root>
      <Node1>
          <Child2>
       </Node1>
    </Root>
    It won't append the node, it will replace everything under Node 1.
    So if this is what you're trying to do (add multiple children nodes), then you would have to create the xml structure using standard DOM objects within a custom component or the script service and the set the resulted xml to an xml variable.
    I hope this clears thigns up.
    Jasmin

  • Problem with Repeating Subform bnot displaying

    I have a reapting subform but when I use the addInstance or InsertInstance, it is not adding a row onto the screen.  I can see from the instanceManager.count that the number of rows has increaes but they are not visible. 
    The Hierarchy is:
    CreateMaterialForm - Subform Flowed, top to bottom    binding: $record.MaterialNode
    ==== ClassificationForm - Subform Flowed, top to bottom     binding: CLASS
    ======== ClassLevelForm - Subform Flowed, top to bottom , Repeat Subform, Min count 1    binding: CLASSTAB[*]
    ============ ClassLevelValue - Text Field     binding: VALUE
    I only ever have the first row regardless of how many rows I add to the data structure at run time.    If I start the table with Min of 5, then the rows will be displayed as I add them to the data table.   
    How do I get the subform to expand to display the additional rows?   I have even tried placing a Button where the click event I did the AddInstance and sthat still did not add more visible rows.  It added rows according to the instanceManager.count. 
    NWDS 7.0.19
    Live Cycle 8.01
    Glenn

    Hi Glenn,
    Have you set the dynamic property of the form true?
    Please write the following code in wddoModifyView mthod of the view:
      if(firstTime) {
        IWDInteractiveForm iForm = (IWDInteractiveForm)view.getElement("YOUR_FORM");
        iForm.setDynamicPDF(true);
    Also do the following:
    In Adobe LiveCycle Designer 7.1 you can discover whether your adobe form was created as dynamic. Open your created pdf file in LiveCycle Designer. Menu File -> Form Properties -> tab Compatibility, Form Type. There must be Acrobat 7.x Dynamic PDF Form File.
    Hope this helps.
    Amit
    Edited by: Amit on Oct 28, 2009 8:43 AM

  • Dynamic Table with repeating Subform

    Hello,
    I am maiking a form which has a Dynamic Table with a repeating Subform.  The repeating subform has a dropdown list field which has three options for the user to pic.  "LABOR", "EQUIPT.", & "MATL."
    The way I want the form to work is the user will choose which item they want to add to the form with the dropdown list.  Whatever amount they put into the "Amount" column will go to the corresponding total "LABORTotal", "EQUIPTTotal", & "MATLTotal"
    The repeating Subform is basically the Row1, but I have the table split up into subforms because of issues I had eariler with the form.  The repeating subform title is "detail". 
    I cannot get the sums for the 3 items to go into the corresponding totals field.  This is the script that I have for the labor total field:
    form1.total.LABORTotal::calculate - (JavaScript, client)
    var nAmount = xfa.resolveNodes("detail[*].Table1.Row1.AMOUNT");
    var nItem = xfa.resolveNodes("detail[*].Table1.Row1.ITEM");
    var nSum = 0;
    for (var i=0; i<nAmount.length; i++)
        if (nItem.item[i].rawValue == "LABOR")
        nSum = nSum + nAmount.item(i).rawValue;
    This.rawValue = nSum;
    I am not familiar with loop scripting or var scripting so I know I am getting it wrong somewhere. 
    I would greatly appreciate any help!
    Thanks

    Okay,
    Here is your form back to you: https://acrobat.com/#d=IA67zcTBrWlnpcYS234*XQ.
    The issue wasn't the script. If you select the dropdown and go to the Object > Binding palette, you will see you had ticked "Specify values" and these were set to 1, 2 and 3.
    This meant that if the user selected LABOR, the value of the dropdown was "1" and NOT "LABOR". This was throwing the if statement.
    I deselected the specify values and it worked as expected.
    Hope that helps,
    Niall

  • How to remove all instance in a repeatable subform (bis)

    Hi Niall,
    A few years ago, you helped a user who asked "How to remove all instance in a repeatable subform". Please could you do again with approximately the same problem ?
    In a click event, I have the script "_CarteEN.addInstance();". Well ! Many cards appear. To protect them, I put above a mask (it's a button with a background Fill). Now, how can I do to remove all masks with only one click using the resetdata or anything else...
    I try this but it doesn't work.
    while (flowedSubform.CarteEN._CacheCV.count > 2)
         flowedSubform.CarteEN._CacheCV.removeInstance(1);
    Many thanks for your help !

    There is no subform named "flowedSubform"
    The "CacheCV" is not a container object (subform). so you can't access the instanceManger of this object.
    the below lines should work
    while(_CarteEN.count >1)
         _CarteEN.removeInstance(1);
    Nith

  • Dropdown within a repeatable subform item propigation question

    I have a repeatable subform with a dropdown and an "Add Subform" button. The user enters various information into the subform and may either select an existing item or enter custom text into the dropdown. Then the Add Subform button is pressed.
    On the click event, I want to propigate the selected item or entered custom data from the 1st subform (index 0) to the newly added subform (index i).
    After doing a resolveNodes I try this:
    Array.item(i).dropdownname.rawValue = Array.item(0).dropdownname.rawValue;
    But I always get the defult value.
    I have also tried various ways to get the selected item or store the selected item (or entered custom data) into another field and use it to either set the rawValue or clearItems()/addItem() in combination, but nothing I try works.
    Any assistance is appreciated, thanks!

    Figured it out in the shower...where I do my best thinking.
    Had to save the rawValue, reset the list by setting selectedIndex to -1, then reload the saved value.
    Probably other ways to do it, but this works.
    Thanks

  • Line at the end of repeat subform

    Hi Adobe experts,
    I have got a situation where in the item table is a subform which i have made it with repeat subform
    The columns of the item table are drawn by lines.
    So for every line item,the horizontal line at the end of the table appears when the subform repeats.
    I do not want the line to appear at the end of line item but only at the end of a page..
    Is it possible to do so ? or we should change the design by using insert table
    Please let me know your suggestions.
    Thanks in advance
    Regards,
    Gowthami SK

    Hello Varun,
    The line is in the end of the subform ( Placed down ),the subform only is for the item table ,so if the line is in the subform ,as the items repeat,the line also gets repeated
    I want the line only at the end of each page when the items get filled
    Regards,
    Gowthami SK

  • Repeating subforms issue

    I am trying to add a repeating subform, but the page ends right after the first instance. So, when I preview and add another instance of the subform, most of the content is not getting displayed. Can anyone please help? I pasted this subform on a new page and it did, indeed, add new subforms. However, when the page ends, so does the ability to have more instances of the subform.
    A second issue is that the button to subtract added subforms does not show up when I add a new subform from the preview. I have checked the code. I used the buttons from the PurchaseOrder.xdp sample. Thanks for any hints!
    Suzanne

    Thanks, Stephen!
    I do have my subform wrapped in a flowed parent subform and have the allow pagebreaks box checked. It just isn't working.
    I don't know how to fix that code. For the add button (which works), I have the following:
    form1.ConnectorInfo.FlowedSF.PropOptionsSF.Button2::click - (JavaScript, client)
    // Get the instance manager.
    var oManager = this.resolveNode("PropOptionsSF").instanceManager;
    // Invoke the Instance Manager to add one instance of the detail subform.
    var oNewInstance = oManager.addInstance(1);
    // Invoke the Instance Manager to insert the subform below the current one.
    var nIndexFrom = oNewInstance.index;
    var nIndexTo = this.parent.index + 1;
    oManager.moveInstance(nIndexFrom, nIndexTo);
    For the subtract button, which never appears, I have the following:
    form1.ConnectorInfo.FlowedSF.PropOptionsSF.Button1::click - (JavaScript, client)
    // Get the instance manager.
    var oManager = this.resolveNode("PropOptionsSF").instanceManager;
    // Invoke the Instance Manager to remove the current instance of the detail subform.
    this.resolveNode("PropOptionsSF").instanceManager.removeInstance(this.parent.index);
    See any obvious problems here?
    Thanks again!
    Suzanne

  • Repeating subforms written out of sequence in XML submission

    I have a form with a repeating subform that I am submitting as XML. The problem I'm seeing is that the XML elements for the 2nd thru N occurrences of the subform are written out of sequence toward the bottom of the XML. Here's the form structure...
    And here's what I'm seeing in the aubmitted XML, with 3 instances of the repeating subform created...
    Any clues ?

    I don't believe you have any control over this - at runtime, the newly generated instances are appended to what's already in the container. Can you change the process that's working with this file to not depend on them being in a particular arrangement? For example if you're processing with something that supports XPath, ask for all the repeatingSubform children of topSubform and you'll get those three together..
    SteveX
    Adobe Systems

  • I'm trying to set the value of a textfield to a instance of another textfield in a repeating subform

    Hello all,
    I am trying set the value of a textfield in a repeating subform/table row to another textfield in a repeating subform with the corrosponding instance number.
    The user enters a list of Key Activities in the first part: -- KeyActivityRow is the repeating subform --
    xfa.resolveNode("form1.#subform.KeyActivities.Row1.Table2.KeyActivityRow.Cell2")
    -- KeyActivityRow is the repeating subform --
    Which then Populates the corresponding occurence of:  --
    xfa.resolveNode("form1.#subform.ActivityTable.HeaderRow.Table1.HeaderRow.Cell1")
    -- ActivityTable is the repeating subform --
    Kevin

    In the calculate event of form1.#subform.ActivityTable.HeaderRow.Table1.HeaderR ow.Cell1 enter this script in Language:JavaScript :
    this.rawValue=xfa.resolveNode("form1.#subform.KeyActivities.Row1.Table2.KeyActivityRow["+A ctivityTable.index+"].Cell2").rawValue
    Kyle

Maybe you are looking for