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

Similar Messages

  • Populating Text Field from Dropdown in Repeating Subforms

    Hi there,
    I'm trying to create a dropdown in a repeating subform that populates a text field in the same subform depending on the option selected.
    I used the functionality described here to acheive the text field population in the first row, but I have trouble when I add additional instances of my subform. In subsequent instances, when I select an option from the dropdown, it changes the text in my first textbox and does not populate anything in the repeated textbox.
    I'm not sure how to get this to work for each added instance and/or how to keep each instance separate from one another.
    Thanks in advance for your help!

    Can you repost the question - some funny formatting issue

  • Repeatable subform is not displaying contents

    I have a number of subforms within my main form - one of the subforms can have multiple instances so I've set it as repeatable, etc. The initial instance of the subform can be invoked from a number of different dropdown lists elsewhere in the form. Now then, I can display the repeatable subform but when I try to display other subforms within the repeatable subform, nothing is appearing - it just shows a space where the content should be! I've set the content of the repeatable subform to be hidden in the layout-ready event of the repeatable subform but still nothing is being displayed.
    It's made even more strange as I have another repeatable subform elsewhere in the form and this displays fine.
    Any ideas what could be the issue? Has anyone come across this before?
    Thanks for any help,

    Using the layout:ready event to show/hide content is a risky business, I have seen inconsitant results in the past, works in one place and not another.
    According to the manual ...
    Note: Scripts that fire on layout:ready should not do anything that would cause the layout of the form to change. For example, this would include anything involving subforms or tables that grow or shrink, adding fragments dynamically at run time, adding or removing subform instances, and toggling the presence setting of an object between hidden and visible.
    (http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000766.html)
    Hope this helps.

  • Repeating Subform reference (FormCalc)

    How do you concisely reference a repeating subform? I need to retrieve a value from a field in repeating subform within a repeating subform without explicitly referencing each field. Please provide a FormCalc sample if possible. Fyi, I have read a million for/if loop and resolveNode threads but still don't get it. The abreviated code is below but goes on forever... Thank you in advance for being so smart and helpful.
    if(PartNo==110) then
         Item1=sfQtMaster.sfQuote[0].sfDetail[0].sfPrice.Item1     //Quote 1, Row 1
         Item2=sfQtMaster.sfQuote[0].sfDetail[1].sfPrice.Item2     //Quote 1, Row 2
         Item3=sfQtMaster.sfQuote[0].sfDetail[2].sfPrice.Item3     //Quote 1, Row 3
    elseif(PartNo==111) then
         Item1=sfQtMaster.sfQuote[1].sfDetail[0].sfPrice.Item1     //Quote 2, Row 1
         Item2=sfQtMaster.sfQuote[1].sfDetail[1].sfPrice.Item2     //Quote 2, Row 2
         Item3=sfQtMaster.sfQuote[1].sfDetail[2].sfPrice.Item3     //Quote 2, Row 3
    endif
    Thanks

    I would make a variable called 'count' and then use a loop to scroll through all the instances referencing the index of each instance as count.

  • Repeating Subforms within Tables and Subforms

    Hi, again =)
    I have another question.
    I'm working with LiveCycle ES4 on a xml form (xdp).
    In this form I have a table with a repeating subform within a row. And inside this subform I have another repeating subform.
    It works like this: the first subform contains data of a category and the other subform contains data of a subcategory.
    There can be multiple categories and within each category it's possible to have several subcategories listed.
    Ok, having said that, my real problem is this one: I can set the header of the table to repeat itself each time the table breaks to the next page but I want the category to repeat also in case the parent subform breaks and I can't.
    I tried a billion things to make this work, like putting a table inside a table. But I cannot make both headers to repeat themselves.
    Can anyone help me with that?
    ..I have also another question: How can I prevent the silly single header that has no rows attached from appear in the bottom of the page?
    Thanks again.
    This community has been very helpful! =)

    I have just been playing around with tables for a project I am currently working on and may have an idea that might work for your last problem of the orphaned header row at the bottom of the page that has no rows attached. Try making two header rows, even if they contain the same information, and, in the Pagination tab, set the first one as "Include Header Row in Initial Page" and set the second one to "Include Header Row in Subsequent Pages".
    You may also find the post http://forums.adobe.com/message/5473853#5473853 of use perhaps.
    Hope this helps,
    Greig

  • 'Repeat Subform for Each Data Item' is greyed out

    Hi there,
    I need to make a certain subform repeatable but the 'Repeat Subform for Each Data Item' is greyed out.  It's parent subform is not greyed out so I can make this repeatable but this is not the requirement.
    Is there another setting that prevents a subform from being repeatable?
    Many thanks,
    Kieran Kelly

    I guess you need to set the set the content flowed instead of positioned for which subform you want to repeat.
    Click on the subform you want to repeat in the hierarchy panel , then in the object panel click on the content and set in the flowed format.
    Hope it helps .
    Thanks.
    Bibhu

  • 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

  • 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

  • Referencing an object in a repeating subform

    I'm trying to have the value of a text field in a repeating subform (lets call it the “Identify” subform) of my form to be set to the value of “TextField18” in the corresponding subform instance of the “Groups” subform.
    In more detail:
    In the form I ask the question - how many groups do you have? The number for that answer is the number of instances of the "Groups" subform that I have. Within that subform is a text field ("Text Field18")  where the user would enter the name of the group.
    Later, in a completely different section of the same form, I have a subform called "Identify". I have figured out how to set the number of instances of "Identify" to match the number of instances of "Groups". What I would like to do is have a field in "Identify" display the name of each group (as entered in "TextField18" in the "Groups" subform) - one per instance of the subform.  So if the groups were Orange, Red and Purple as entered in instances 1-3 respectively of the "Groups" subform. I would want the field in instance 1 of the "Itentify" subform to autopopulate with Orange, and the field in instance 2 to autopopulate with Red, and so on.
    Is this possible?  Any advice is appreciated!

    Hi,
    Your repeating subforms, Groups and Identify, will have an index property to identify their occurance.  So in the calculate event of the textfield in Identify using JavaScript place the following code;
    xfa.resolveNode("Groups["+Identify.index+"].TextField18").rawValue;
    This will return the corresponding value in the Groups subforms.  Note you may have to adjust the SOM expression if Groups and Identify are not at the same level.
    Bruce

  • 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]

  • 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

  • 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!

  • 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

  • Need help with repeatable subform

    I am trying to create an interactive form for users to enter in data and print off. I need part of the form to be repeatable if required by the user. I created a subform and added a button but it doesn't seem to be working (the preview format is Acrobat 8 Dynamic XML and I've saved the form as that too). The top part of the form - Box Information - does not need to be repeatable. I need the File Information to be repeatable at the user's request, so I assumed adding a button would do the trick. The user needs to be able to add as many File Information subforms as possible (minimum of 1).
    I've set the content of the parent subform to Flowed, and I added objects to a subform which I wrapped within the parent subform, and set its content to flowed, but when I do this my formatting gets messed up and I can't move individual objects. (Basically, the File Information should look like the Box Information at the top of the form). I also set the Binding to repeat.
    Do I only need 1 subform for the File Information or does it need to be in a subform wrapped in a subform? Do I create the subform first then add objects, or the other way around? What script do I need for the button? For now I have (Java):Subform1.instanceManager.addInstance(
    true);
    I've attached the form as is, and would appreciate any help. This is my first time creating an interactive form and it's not going so well!
    Thanks,
    Karen

    Anyone have any advice?
    I've been playing around with this, and still can't get it. I've wrapped a flowed subform within a flowed subform, and have Repeat checked off. I added a button outside the subform I want repeated, and have used the scripts __FileInfo.instanceManager.addInstance(1); and __FileInfo.instanceManager.addInstance(true); but neither work. I have the form properties preview set to Interactive and Acrobat 8 Dynamic. Nothing happens when I click on the button. I've attached a new sample of the form I'm trying to create. Help please!
    Thanks,
    Karen

Maybe you are looking for