referring to an object in a repeating subform

Trying to get the value of a text field in a repeating subform (lets call it the subform "Identify") of my form to be set to the value of "TextField18" in the corresponding instance of Subform subform 'groups '.

In more detail:

In the form, I ask the question - groups how do you have? The number of this answer is the number of instances of the subform 'Groups' that I have. Within this subform is a text field ("text Field18") where the user will enter the name of the group.

Later, in a completely different section of the same shape, I have a subform called "identify." I understand how to set the number of instances of "Identify" to match the number of instances of 'groups '. I want to do is have a field 'Identify' display the name of each group (as he entered "TextField18" in the "Groups" subform) - one per instance of the subform.  So if the groups were in Orange, red and purple entered instances of 1-3 respectively on the subform "Groups". I want the field 1 of the "Itentify" subform to autopopulate with Orange and the field in case 2 of autopopulate pending with red and so on.

Is this possible?  All advice is appreciated!


Hello

Your repeated subforms, groups and identify, will have a property index to identify their appearance.  Thus, in the case of calculation of the object textfield to identify using JavaScript place the following code;

xfa.resolveNode ("groups [" + Identify.index +"]. TextField18") .rawValue;

This will return the corresponding value in the subforms of groups.  Note You may need to adjust the SOM expression if the groups and identify them are not at the same level.

Bruce

Tags: Adobe LiveCycle

Similar Questions

  • XML schema to generate data from the table of data from a repeating subform

    Hi all, I would like to have a check box that when checked, allows you to hide a quote form and make a purchase order form visible, carrying a part of the field of the form of citation data in a new table on the order form. I have attached to this form to https://workspaces.acrobat.com/?d=pqpsXx5VPi * LkMeVKrX57w if you want to take a look. If the check box is cleared, he hid the PO form and to make quite visible.

    The idea behind this is that my client will create his quote and send t to his client. Once the customer accepts the quote, he simply click a button to generate its purchase order send it to its supplier.

    It seems that I have buttons to add lines on the submission form that the problem is more complex. I would be able to do it myself if the table has a fixed number of lines and I was able to use global fields, and naming each cell something different, but because it's a single repeating subform, I can't operate at all.

    I understand that, because it's a repeating subform that I need to create an XML schema to do this, but also can not know for the life of me how to create the schema. I read tons of tutorials, but no idea how to apply it to my specific needs. I've been able to find only info on how to bind the data source once it's been created.

    I would be eternally grateful if someone could help out me.

    Thank you!

    I edited your form and put it here.

    Here's what I did:

    • Script inserted into your box renamed someone who mask/displays the purchase order / sales quotation
    • I have included a script object with a function I wrote to transfer data from as named fields/subforms from one section to another
    • Inserted a few fields in your table of purchase order

    What you need to do is to complete the development of your purchase order table. Make sure that the common fields between the quote and purchase tables have the same name in order to transfer data.

    No necessary schema.

    Kyle

  • Delete the blank page with repeated subforms

    Hi all!

    I have a form for the statements.

    Each statement must be set on a new page.

    I solved this with a repeating subform.

    And in the repeated subform properties variable "After" a "go to the next Page.

    This works well with only one drawback. In the end, an empty page is also be created.

    I would like to get rid of this blank page.

    But how is that possible?

    Kind regards

    Anton Pierhagen

    (1) select your repeating subform and add a conditional Break (object > paging > Edit...).

    (2) enter this script: this.instanceManager.count > this.instanceIndex + 1

    (3) select Pause: after and to: top of Page

    4) click OK

    Kyle

  • Fill color for repeating subforms

    I have a repeating subform with subforms County max 5.

    Is it possible the 4th and 5th expandable lines to have a different fill color?

    Here is the script that I use for the button Add an Instance:

    _Item.addInstance ();

    Thank you

    Here is the script I use to remove button Instance:

    If

    (_Item.count > 1)

    _Item.removeInstance (this.parent.index);

    Item is a line in a table.

    Hello

    First of all, I would be disinclined to appoint an object/subform 'point'. It is very near a reserved word 'point'.

    Also in the addInstance() method, you must pass a parameter. The default value is true.

    Only way would be to use the layout event: loan of the repeating subform. It is not very effective, because the layout event: loan fires so often when the user interacts with the form. However, it will deal with situations where the lines are added and removed.

    if (this.parent.index >= 3) {
         this.fillColor = "255,129,129";
    }
    

    This might give you a start,

    Niall

  • Hidden visible repeatable subform based on drop-down list selection.

    LiveCycle - hidden repeatable subform becomes visible when a "MO" is selected. However, if "MO" is replaced by "KS" or any other State in the expandable lines, visible subform should back to hidden.

    Hello

    to be able to do so, you should have your drop-down list in a repeatable subform which should be considered your main earthquakes Canada, so you can have 5 drop-down lists with each subform respectively 1 comes with it.

    So let's say that your drop-down list in a repeatable subform, and you have another subform linked to this drop-down list below

    in your drop down list exit event list, you should have if statements to determine what value is chosen, and then according to the selected value display you or hide the subform

    This.parent.index is the index of the subform you want to hide, if your combo is directly in the subform repeat you to the other subforms you hide / show

    If (this.getDisplayItem (this.selectedIndex) == "MO") {}

    Page1.resolveNode ("repeatSubform [" + This.parent.index.ToString () + "]"). Presence = "visible";

    } else {}

    Page1.resolveNode ("repeatSubform [" + This.parent.index.ToString () + "]"). Presence = "hidden";

    }

    I hope this helps!

  • Create a secondary named calculation in a repeating subform based on a drop down list?

    Hi all

    I need a little crazy script. Not sure it is even possible.

    What I have:

    1. repeating subform SummarySub amounts
      1. calculation at the end of the form TotalOver field gives the total dollar amount of all iterations of SummarySub

        so far, so simple. but then:
    2. I need another, repeating the SubRow subform at the end of the form to give to other total:
      1. based on the drop-down list the name of the originator in SummarySub
      2. and break out the totals of all iterations of SummarySub based on payer such as chosen by the user names.

    Ideally, the subform (the principal totals) (B) at the end of the form would add instances as the user leaves the field name of the payer. I was not able to find a way to make and to keep the value in the field (name of the payer) of the additional instance.

    All this makes sense?

    I'll appreciate any help.  I'm trying to learn more about JavaScript in LC, but my bills just keep coming...

    Thank you very much

    Laura

    Dropbox - AFBS_OverpaymentReport_121914.pdf

    Hi Laura,

    Take a look at the modified version of your form, https://sites.google.com/site/livecycledesignercookbooks/home/AFBS_OverpaymentReport_01011 5.pdf? attredirects = 0 & d = 1.  I added a subform called PayerTotals, which has a summary of insurance created in his event to calculate.  The code looks like.

    var oFields = xfa.resolveNodes("SummarySub[*]"); 
    
    var nNodesLength = _SummarySub.count; 
    
    var nSum = 0; 
    
    var insuranceCompanies = {}
    
    for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { 
    
     var item = oFields.item(nNodeCount);
    
     if (!item.InsuranceCompany.isNull && !item.OverpaymentAmount.isNull) {
    
     if (insuranceCompanies[item.InsuranceCompany.rawValue]) {
    
     insuranceCompanies[item.InsuranceCompany.rawValue] += item.OverpaymentAmount.rawValue
    
     else {
    
     insuranceCompanies[item.InsuranceCompany.rawValue] = item.OverpaymentAmount.rawValue
    
      nSum += item.OverpaymentAmount.rawValue; 
    
    totalover.rawValue = nSum;
    
    _PayerTotal.setInstances(0);
    
    for (var insuranceCompany in insuranceCompanies) { 
    
     var payerTotal = _PayerTotal.addInstance();
    
     payerTotal.InsuranceCompany.rawValue = insuranceCompany;
    
     payerTotal.totalover.rawValue = insuranceCompanies[insuranceCompany]; 
    

    Hope this helps

    Bruce

  • Conditional break - first rather than repeating subforms

    I have a repeated subform (new instances added by a button). It is sunk and content page breaks are allowed. Pagination is located at following previous/ongoing Parent of filling. I want to all instances of the subform to start on a new page, with the exception of the first instance.


    I think that this is possible by specifying a conditional break. I put in 'Break before', but what can I specify as a condition When? I tried When condition of:


    higherlevelforms._mysubform. Count > 1


    This causes all subforms start on a new page, but how do I add "except for the first instance of mysubform" on the condition that the first instance of mysubform does not start a new page?


    Thank you.

    All I had to do was test for this.index:

    higherlevelforms._mysubform. Count > 1 & this.index > 0

  • How to successfully reset the fields in a repeating subform

    Hello

    I'm more and more frustrated just trying to create a form dynamic xml () with lifecycle designer.

    As a test, we build a form that contains a repeating subform.

    We want to reset the fields in the current subform and only the current subform using the following snippet:

    var som_kdnr = this.parent.somExpression + ".." Kopfzeile.Kundennummer ';

    xfa.host.resetData (som_kdnr);

    But instead of reset the field "Kundennummer' in the current subform, copy the following code resets this field in all subforms.

    And to make this behavior even more "interesting" than that happens only if we use Adobe Reader XI - if we use Foxit Reader, the script does the job...

    How can we get this running in two players?

    You should not add a string to the somExpression, you must Access the Kundennummer field and then use the somExpression instead of do it yourself.

    this.resolveNode("Kopfzeile.Kundennummer").somExpression;

  • Do some required fields in a repeating subform - verified/validated on preSubmit

    I have a form that contains a repeating subform - sense, there is only one subform (Western flowed) with binding set to repeat a 1 Min and Max of 15 (subform extensible so dynamic).

    In the subform are 5 fields (example below):

    First name

    Family name

    Email address

    Age

    Sex (radio button for men and women)

    If the user enters a value for the first name, then the name, the age and the gender option button should become "necessary". Similarly, if the first name value is empty/null, then the fields first name, age and sex radio button should be optional.

    I understand that this can be achieved quite easily if the subform was not repeat:

    If (!) ((this.isNull))) {//if FirstName field is not null

    LastName.mandatory = 'error ';

    Age.Mandatory = 'error ';

    etc.

    }

    else {//if field is null

    LastName.mandatory = "disabled";

    Age.Mandatory = "disabled";

    etc.

    }

    However, how this is achieved in a repeating subform?  If the above script is placed in the repeating subform, it affects ALL repetitive lines in the subform group once rendering. Instead, I need the mandatory conditional status treated on a basis of single instance (online).

    Thanks in advance

    Hello

    I do not see a problem to make this work even with repeated subforms.

    Here's a sample for you.

    https://files.Acrobat.com/preview/7dc1e4aa-5160-4058-a59e-77b77dbf658f

    I hope this helps.

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

    Hi all

    I try to set the value of a textfield in a repeating subform/table row to another textfield in a subform that is repeated with the corrosponding instance number.

    The user has entered 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-

    Who fills the corresponding occurrence of: -.

    xfa.resolveNode ("form1. #subform. ActivityTable.HeaderRow.Table1.HeaderRow.Cell1')

    -ActivityTable is the repeating subform-

    Kevin

    In the event of form1 calculate. #subform. ActivityTable.HeaderRow.Table1.HeaderR OE. Cell1 enter this script in any language: JavaScript:

    this.rawValue = xfa.resolveNode ("form1. #subform. KeyActivities.Row1.Table2.KeyActivityRow ["+ ctivityTable.index +"]. Cell2") .rawValue

    Kyle

  • Objects scripts stop working if I first change other objects in an another subform?

    The problem I have is a little hard to explain, but I'll try:

    I have a checkbox set up in a sub-forum that defines the visible radio buttons when selected, to hidden when not controlled by using the following script in the Exchange field:

    -------------------

    Form1. P1. Sec3.intranet2.Engineering::change - (FormCalc, client)

    If (genius == "1") then

    ebuttons. Presence = "visible."

    on the other

    ebuttons. Presence = "hidden".

    endif

    ---------------------

    As long as I don't touch other objects in an another subform before changing these objects, the boxes work fine. If I change to another object that runs a script in an another subform first, say:

    -------------------------------

    Form1. P1. Sec1.RequestType::change - (FormCalc, client)

    var salt = $event.change

    If (salt eq "adds") then

    Form1. P1. Sec3.Rectangle1.presence = "hidden".

    Form1. P1. Sec1.Modify1.presence = "hidden".

    Form1. P1. Sec1.DELETE1.presence = "hidden".

    Form1. P1. Sec1.delete2.presence = "hidden".

    Form1. P1. Sec1.delete3.presence = "hidden".

    Form1. P1. Sec1.name1.presence = "hidden".

    Form1. P1. Sec1.name2.presence = "hidden".

    Form1. P1. Sec1.fname.presence = "visible".

    Form1. P1. Sec1.StartDate.presence = "visible".

    Form1. P1. Sec1.Dept.presence = "visible".

    Form1. P1. Sec1.location.presence = "visible".

    Form1. P1. Sec1.position.presence = "visible".

    Form1. P1. Sec1.empstatus.presence = "visible".

    Form1. P1. Sec1.reports.presence = "visible".

    ElseIf (salt eq ' Edit') then

    Form1. P1. Sec1.DELETE1.presence = "hidden".

    Form1. P1. Sec1.Modify1.presence = "visible".

    Form1. P1. Sec1.delete2.presence = "hidden".

    Form1. P1. Sec1.delete3.presence = "hidden".

    Form1. P1. Sec1.fname.presence = "hidden".

    Form1. P1. Sec1.StartDate.presence = "hidden".

    Form1. P1. Sec1.Dept.presence = "hidden".

    Form1. P1. Sec1.location.presence = "hidden".

    Form1. P1. Sec1.position.presence = "hidden".

    Form1. P1. Sec1.empstatus.presence = "hidden".

    Form1. P1. Sec1.reports.presence = "hidden".

    ElseIf (sel eq "Delete") then

    Form1. P1. Sec3.Rectangle1.presence = "hidden".

    DELETE1. Presence = "visible."

    delete2. Presence = "visible."

    delete3. Presence = "visible."

    Modify1.presence = "hidden".

    fname. Presence = "visible."

    StartDate.Presence = "hidden".

    Dept.Presence = "visible".

    Location.Presence = "visible".

    position. Presence = "visible."

    empstatus. Presence = "visible."

    Reports.Presence = "visible".

    Name1. Presence = "hidden".

    name2. Presence = "hidden".

    position 1. Presence = "hidden".

    position2. Presence = "hidden".

    Dept1.presence = "hidden".

    Dept2.presence = "hidden".

    endif

    -----------------------------

    And then try to go to the first mentioned subform and try to change whatever it is, the script does not work and radio buttons never change their visibility state.

    HOWEVER, if I first change the State of an object in the first subform, go to the other and make a change there and then go back to the first subform and making another change, it will work BUT other subforms that have not changed will fail to work at all.

    I would that all subforms to any, subform/object is first changed function. I guess it's possible, but I don't know how/why I'm having this problem.

    I made a few changes.

    Should work now.

    https://Acrobat.com/?d=sCEZTo * Xwdrd6uXQUagsxg

  • Value of the field in a repeating subform

    I have a repeating subform with text for City, State, and Zip fields. I want to take everything that the user enters in the first (or only) instance fields and automatically put this information in a city, State or Zip field in a completely different section of the form.  I just need to copy on the first instance of these fields if there are multiple instances.  I can get this to work if the user adds an instance of the repeating subform and add a second city, State and/or Zip, but I can't make it work if there is only one instance of the repeating subform.  It does not work if the user adds an instance but does not come to the city, the State or the Zip.  I need to run regardless of the number of instances.

    For example, here's what I put in the case of 'change' of the city (inside the repeating subform) field and it works if there is another instance added:

    Form1. Page3.CityOther.RawValue = form1. Page1.SubformRepeat [0]. . RawValue City [0]

    (It's using FormCalc. I couldn't JS to work).

    I would put in the case of page layout: loan of form1. Page3.CityOther (in formcalc):

    If (form1. Page1.SubformRepeat [0]. . IsNull City [0] == 0) then

    $ = form1. Page1.SubformRepeat [0]. City [0]

    endif

    In this way, it has nothing to do with the instance manager and just make an equal to another if there is a value in the first.

  • SEO lines stretch in a repeating subform - argh - it can't be this hard. THX.

    Hi people,

    I'm sure this is a simple fix - but I've been hit my head a few days on this.

    I have a Table (table 1) that contains

    a section (SectionArea) (repeat)

    each SectionArea has Row1, Datarow (repeat), Row3

    Capture.PNG

    I have the standard buttons + - on the sectionArea, they work fine.

    Add

    var nIndex = SectionArea.index;

    _SectionArea.addInstance ();

    Delete

    _SectionArea.removeInstance (SectionArea.index);

    DataRow Add button works very well with:

    var nIndex = Datarow.index;
    var s = "SectionArea []" + SectionArea.index + "]." DataRow.
    xfa.resolveNode (s).instanceManager.addInstance (0);

    Is the button Delete on Datarow that I can't understand how to do the work

    App.Alert (DataRow.index);
    _Datarow.removeInstance (DataRow.index);

    In the case of a form that ends up with:

    SectionArea [0]

    DataRow [0]

    DataRow [1]

    DataRow [3]

    SectionArea [1]

    DataRow [?]

    DataRow [?] *.

    When the delete event is called on the * row, what would the syntax to remove this datarow?

    is - this _Datarow.removeInstance [5]?

    is - this _Datarow.removeInstance [2]?

    is - this SectionArea [1]. DataRow.RemoveInstance [2]?

    It is SectionArea [1]. DataRow.RemoveInstance [5]?

    How can I do this programmatically?

    I'm guessing it's simple. Part of my problem is not understanding how to reference the specific line, what this.parent.index is the index of the datarow - datarows all, or only the datarows inside this special SectionArea?

    My head becomes painful. Thanks in advance-

    see you soon

    Dean.

    ????

    Hi Dean,

    It looks like the continuous repetition Datarow instance / span on multiple instances of the SectionArea.

    Then take a look at this version on page 2, where I created a repeatable subform in a layout sank (for the SectionArea) and a Table with a line stretch: https://acrobat.com/#d=-yiMpjWKM2nq6sMGIZctDQ.

    Good luck

    Niall

  • Length of lost repeatable subform?

    I have this code in the click event of a button 'Delete' in a repeatable subform:

    var SFArray = xfa.resolveNodes ("SubForm [*]"); build the table of subforms

    xfa.host.messageBox ("length =" + SFArray.length);

    If (_SubForm.count > _SubForm.occur.min) {/ / check for at least}

    _SubForm.removeInstance (SubForm.index); remove a requested instance

    } / / end if

    var SFArray = xfa.resolveNodes ("SubForm [*]");

    xfa.host.messageBox ("newlength =" + SFArray.length);

    At runtime, I get length = 3 (for example), then newlength = 0 after the removeInstance

    I do not understand why the product 2nd resolveNodes length = 0 and the following code using the table fails with "index out of range".

    Thanks for any help!

    I also tried to take the "var" out of the resolveNode statement 2nd without change in results.

    Thank you

  • Help please - at wits end with repeatable subform.

    I know it should be easy and basic, but after about 20 hours, I still don't know what I'm doing wrong.

    I want just one button to add another subform that contains the fields that must be met.

    It is a sign of the event in the journal I want to distribute iPads.  It has some user details then they would click on submit and it would add the subform to the next participant to complete.

    Thank you much, long in advance, for your help.

    http://www.gatorserver1.com/links/SIS-LC-v17.PDF

    I ' watched ved your form and cannot begin to understand the coding you for the add section button (you're away from me), but I can make it work with a simple script.

    1. your subform must be sent.

    2. you define the information in "repeat subform for each data element" in the binding tab

    3. I added a blank space at the bottom of the subform flowed in the Layout tab to make a full page

    4. place the button in the subform flowed

    5. use this script ' Form1.Page1.AttendeeSubform.instanceManager.addInstance (1); "in the click event

    6 examine the properties and make sure that the version "run as" is compatible with what you're doing

    7. save the form a dynamic not a static

    I hope this helps.

Maybe you are looking for

  • Disable AutoComplete in Safari

    Hello I would like to disable the auto complete fiction in the Safari browser in my iMac. It's a constant irritation. Would appreciate any help. Thank you rlmslo

  • cluster complex labwindows cvi

    Hello I'm trying to convert a LabVIEW LabWindows/CVI dll code to meet certain requirements of the processor. I'm passing a group of parameters and variables in the DLL, some of the elements which are arrays. My question is twofold: How to refer to va

  • Module closed

    I inadvertently closed a module on my personal site to MSN and now can't get it back. It contains a lot of information which has been customized for me and, as a result. is precious to me. Two questions: one) how can I recover this module; and (b) ho

  • problem to connect to http WI - FI

    I'm triying to connect to HTTP using a WI - FI connection, but it gives an exception: net.rim.device.cldc.io.dns.DNSException: DNS error Error code: 7. This error occurs in the las line copied below. This is the code: HttpConnection conn; boolean sto

  • RIM: orientation ignored on PlayBook

    I created an application WebWorks and specified committees mode = "landscape" / > in the config.xml file.  It seems as if this directive is ignored on my device because it runs in portrait mode, when I turn my camera.  Anyone know the proper way to l