Subform reference (instance/index)

I have two drop-down boxes in a subform.  When item in first drop-down is selected, items in second drop-down are limited (see example below).  My problem is when multiple instances of the subform exist, the first drop down will only apply to the first instance of the form.  Is there a way to be more specific in a subform row/instance reference?  I want to change the item in the current row or current instance of subform.
Example: 
1st Drop-down     2nd Drop-down
US                     New York or Washington (choose one)
France                Paris or St. Martin (choose one)  
Thanks

This image illustrates my problem.  This table is actually a series of subforms.  When a new instance is added, the user can choose a different region and then a state within the region.  My problem is as rows/subforms are added I can't get the code to refer to the appropriate instance.  It will only refer to the first instance and no new instances.

Similar Messages

  • Problem in  setting Composite Instance Index in SOA 11G

    In SOA 11G the setIndex() xpath function is not working . But It was working in 10G.
    If I use this setIndex function in BPEL Java Embedding , in audit trails the function is executed. But If I see the result by querying the DEV_SOAINFRA.COMPOSITE_INSTANCE table INDEX1 column it is empty. No values is inserted into this INDEX columns.
    Can anyone please give a solution to set the composite instance index in SOA 11G ?
    Thanks in Advance

    1. setIndex() Xpath function in SOA 11G is working .
    2. syntax : setIndex(1,'anyValue');
    3. To view the index value for the instance created , query "DEV_SOAINFRA.CI_INDEXES" table.
    Edited by: saba on Dec 6, 2011 6:22 AM

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

  • Calling a Script Object after remove instance index[0]

         I have created a LiveCycle document that has a repeatable subform as url linked below. The form will not let me call a Script Object after removing an instance at index[0]. Regardless of the number of instances remaining. I use a script object to show and hide buttons. Adding an instance is not a problem. What to do?
    Script on Delete Subform Button (Error):
    xfa.form.recalculate(1);
    this.resolveNode('fifteenSubform._CorrectiveActionWrapper').removeInstance(this.parent.ind ex);
    if (xfa.host.version < 8) {
    //deleteing a [0] index seems to create a problem for executing the function in this Script Object
    SOremove.fxremove();
    https://files.acrobat.com/a/preview/03389d79-9020-45d9-ba4f-fb4cbdc21f77

    Hi,
    What seems to happen when you remove a form object that has code that is currently executing is that it can't find the next line.  You might want to put all your code in the script object.
    so in the click event you have;
    SOremove.fxremove(this);
    Then your script object will start
    function fxremove(button) {
        button.resolveNode('fifteenSubform._CorrectiveActionWrapper').removeInstance(button.parent.index);
        if (xfa.host.version < 8) {
            xfa.form.recalculate(1);
        console.println("The SOremove.fxremove fired");
    Regards
    Bruce

  • Subforms within subforms add Instance problem

    Hi
    I am new to Adobe Livecycle Designer (I am using version 8.2.1) but I have successful made nearly all elements of the quite long form I need to produce except for one section I am having difficulty getting it to function correctly. In the example I have a repeating subform ‘Organisation’ on page subform ‘Membership’ which has buttons to add and remove instances, which work correctly. But within each instance of this ‘Organisation’ subform is another repeating instance subform ‘ExpertNames’ with buttons to add and remove instances.
    The ‘Organisation’ form allows an organisation to be named and the ‘ExpertNames’ subform allows multiple members for that organisation to be named and associated to each organisation. The user should be able to list multiple organisations each with one or more members. I can successfully add multiple instances of ‘Organisation’ form one after another using
    Membership.Organisation.instanceManager.addInstance(1)
    and remove the selected instance using
    Membership.Organisation.instanceManager.removeInstance(this.parent.index)
    I have the following set on the button to add a new instance of the ‘ExpertNames’ form
    Membership.Organisation.ExpertNames.instanceManager.addInstance(1);
    and the following to remove the selected instance of the 'ExpertNames' form
    Membership.Organisation.ExpertNames.instanceManager.removeInstance(this.parent.index);
    However when I add a second instance of the ‘Organisation’ form i.e. a new organisation and try and add additional members to the 2nd organisation it adds them to the 1st organisation rather than the second! I have an example of the problem form i can send if needed.
    Hope someone will be able to help with this.
    Many thanks in advance
    Lara

    I still have not been able to find a solution to this does anyone have any ideas?
    I have an example of the problem in a form that I can email.
    Many thanks in advance
    Lara

  • Count instances of additional subforms using instance manager

    I am familiar with using the following code in the calculate event in tables when the instance manager is used to add rows:
    this.rawValue = this.parent.index+1;
    However, I have a simple form that due to the need to expand the text field, I have used used a subform rather than table. While the instance manager works correctly, the number remains at one for each added instance.
    A link to the form is here:
    Dropbox - SMP Comments Form.pdf
    Any help would be appreciated.

    Hi,
    Using .parent only gets you to the StaticPortion object, you need to go one further up, so either use parent.parent or CommentSubform (which is the one that repeats).
    If you change your calculate event code to the following you can remove the layout:ready code.
    var count = _CommentSubform.count
    this.rawValue = CommentSubform.index+1;
    Regards
    Bruce

  • The truth about objects, references, instances and cloning (Trees and Lists

    Hello
    As a few of you may have know from my postings over the past few weeks, ive been building my first real java ap and trying to learn along the way, hitting a few snags here and there.
    One main snag i seem to have been hitting a fair bit is objects and instances, im kinda learning on how they work and what they mean but as a php programmer it seems to be very different.
    as pointed out to me if you have objectA=objectB then in php you have two objects that share the same value but in java you have still one object value and one object pointing to the value.
    sooo my first question is
    if i have this
    Object objA=new Object()
    Object objB=objA()then object A creates a new memory allocation for the object data right? and object B is simply a reference to the object A memory allocation right?
    so therefore there is no instance of objectB? or is there an instance of object B but it just takes up the same memory allocation as object A?
    anyway, what is the point of being able to say objB=objA what can that be used for if not for making a copy of an object (i understand now that it doesnt copy an object)
    My second question (which i think i actually understand now, but im posting it to see if the answers may help others)
    If i have a List structure (e.g. arraylist) then when i add a datatype such as a treemap does it not add the changed treemap, ill try and explain with code
    ArrayList mylist=new ArrayList()
    Treemap myTree=new Treemap()
    myTree.put("hello","howdy");
    myTree.put("bye","cya");
    mylist.put(myTree);
    System.out.println(mylist.toString());
    myTree.put("another","one");
    mylist.put(myTree);
    System.out.println(mylist.toString());now to be honest ive not actually tried that code and it may actually procude the right results, but from my experience so far that similar sort of thing hasnt been working (by the way i know the above code wont compile as is :p)
    anyway what i assume is that will output this
    [Hello,howdy,bye,cya] <<this is the first system out
    [Hello,howdy,bye,cya,another,one  <<this is the second system out
    Hello,howdy,bye,cya,another,one] <<this is the second system out
    where it should produce this
    [Hello,howdy,bye,cya,
    Hello,howdy,bye,cya,another,one]
    Why when I update the treemap does the arraylist change, is this because the thing that is being put in the array list is infact not an object but simply a reference to an object?
    thanks for everyones help so far :)

    as pointed out to me if you have objectA=objectB then
    in php you have two objects that share the same value
    but in java you have still one object value and one
    object pointing to the value.Some years ago, I built a small website managing data saved in an XML file using PHP. Being used to Java, I used an OO approach and created classes managing data structures and having setter/getter methods. The fact that PHP did actually create a copy of any object being passed as and argument made me crazy. This way, I wasn't able to reach the same instances from several different places in my code. Instead, I had to put a certain operator ("&" I think) before any reference to force PHP not to make a copy but pass the reference. I also found a note on the PHP site saying that copying was faster than passing the reference, which I actually couldn't believe. If I'm not wrong, they changed the default behaviour in PHP5.
    if i have this
    Object objA=new Object()
    Object objB=objA()then object A creates a new memory allocation for the
    object data right? and object B is simply a reference
    to the object A memory allocation right?The statement "new <Class>" allocates memory. The reference itself just takes up a few bytes in order to maintain some administrative data (such as the memory address). References are basically like pointers in C, though there's no pointer arithmetics and they can't point to any arbitrary place in memory (only a legal instance or null).
    so therefore there is no instance of objectB? or is
    there an instance of object B but it just takes up
    the same memory allocation as object A?There is an instance of objectB, but it's just the same instance that objectA is pointing at. Both references objectA and objectB contain the same memory address. That's why they'd produce a result of "true" if compared using the "==" operator.
    anyway, what is the point of being able to say
    objB=objA what can that be used for if not for making
    a copy of an object (i understand now that it doesnt
    copy an object)Sometimes you don't want to make a copy, as 1) it consumes more memory and 2) you'd lose the reference to it (making it more difficult to tell what instance is actually accessed). If there was no way to pass a reference to an object into a method, methods wouldn't be able to affect the original instance.
    Why when I update the treemap does the arraylist
    change, is this because the thing that is being put
    in the array list is infact not an object but simply
    a reference to an object?The ArrayList doesn't change at all. It's the instance that's being changed, and the ArrayList has a reference to it.

  • Subform add Instance problem

    G'day
    I'm very new to LiveCycle and teaching myself to create forms
    I have a drop down box in a subform requesting information. Depending on the information required certain text boxes will appear (using switch case script) dateFrom dateTo dateCourt txtOther
    When I add a new instance of this subform the list appears correctly in the drop down box but when the item is selected the text boxes do not appear at all.
    I am probably missing something fundamental. Any ideas
    Cheers
    //cboInfoRequired
    RFI.InfoRequested.Info.cboInfoRequired::exit - (JavaScript, client)
    switch(RFI.InfoRequested.Info.cboInfoRequired.rawValue){
      case "Info A":
      RFI.InfoRequested.Info.dateFrom.presence = "visible";
      RFI.InfoRequested.Info.dateTo.presence = "visible";
      RFI.InfoRequested.Info.dateCourt.presence = "hidden";
      RFI.InfoRequested.Info.txtOther.presence = "hidden";
      break;
      case "Info B":
      RFI.InfoRequested.Info.dateFrom.presence = "hidden";
      RFI.InfoRequested.Info.dateTo.presence = "hidden";
      RFI.InfoRequested.Info.dateCourt.presence = "visible";
      RFI.InfoRequested.Info.txtOther.presence = "hidden";
      break;
      case "Info C":
      RFI.InfoRequested.Info.dateFrom.presence = "hidden";
      RFI.InfoRequested.Info.dateTo.presence = "hidden";
      RFI.InfoRequested.Info.dateCourt.presence = "hidden";
      RFI.InfoRequested.Info.txtOther.presence = "visible";
      break;
      case "Info D":
      RFI.InfoRequested.Info.dateFrom.presence = "hidden";
      RFI.InfoRequested.Info.dateTo.presence = "hidden";
      RFI.InfoRequested.Info.dateCourt.presence = "hidden";
      RFI.InfoRequested.Info.txtOther.presence = "hidden";
      break;
    //cmdAdd
    RFI.InfoRequested.AddInfo.cmdAdd::click - (JavaScript, client)
    RFI.InfoRequested.Info.instanceManager.addInstance(1);

    Hi,
    the problem is your SOM expression.
    When you write RFI.InfoRequested.Info.dateFrom.presence = "hidden"; the PDF-viewer interprets it always as RFI[0].InfoRequested[0].Info[0].dateFrom[0].presence = "hidden"; where the accessor [n] is always 0 which means the first instance of the related object.
    It should work if you just write dateFrom.presence = "hidden"; because the object is at the same level in the hierarchy and there is no need to parse the entire tree to find the object.

  • Any workaround for - Like '%VALUE' to reference the index

    Hi
    I have an index on Col1 but it is not referenced because i am making like '%value'
    EX:
    where Col1 LIKE '%VALUE'
    this is a business request to search %Value and not Value%
    is there is any workaround for that ?
    Thanks

    Define working perfectly.
    Just because it's using an index doesn't mean it's efficient.
    One proper solution here is to create a function-based index to reverse the string.
    You could use the undocumented, unsupported REVERSE function to test but as a proper implementation you should probably implement your own reversing function.
    That way, instead of a leading wildcard, you end up with a trailing wildcard and you can use an appropriate index when suitable.
    e.g. something like
    CREATE INDEX i1 ON t1 (REVERSE(col1));
    SELECT *
    FROM    t1
    WHERE REVERSE(col1) LIKE REVERSE('%Value');

  • Adding subform using Instance Manager

    Good Day;
    I am developing a form and one of the things I am trying to do is get a full subform to repeat if the user has to add more items.
    The subform has 1 table and 1 row. If the user selects from a status dropdown  anything but “green”  a text box becomes visible and the user must add details.
    I have placed a button on a separate subform if the user wants to (needs to) add 2 or more projects.
    I tried using the following and I get the standard “general” error.
    psl_list_subform.instanceManager.addInstance(1);
    Am I going about this correctly or am I way out in left field.
    Thanks all
    Chomp

    Thanks Paul.
    It did not seem to work.
    I have tried both ways _psl_list_subform.addInstance(1). And
    Psl_list_subform.instanceManager.addInstance(1);
    And I am getting the same error.
    GeneralError: Operation failed.
    XFAObject.addInstance:1:XFA:form1[0]:#subform[0]:psl_list_subform[0]:Table5[0]:Row1[0]:But ton[0]:click
    The element [max] has violated its allowable number of occurrences.
    I have Repeat row for each data item checked off. This field is grayed out for the psl_list_subform.
    Within the subform I have 1 table with 1 row, a text box . When the user clicks the “add” button I would like the table to repeat along with the textbox below it.
    Using the codes above I have tried with the add button inside the psl_list_subform as well as placing the add button outside the psl_list_subform. I still get the same error.
    I have a feeling I am either missing something basic or I am going about this all wrong
    Thanks again Paul

  • Using cross-references in the index?

    Wondering if there are any suggestions out there for using
    cross-references in the index.
    I don't think using the "See also" option is what I'm looking
    for; what I'd like to do is create index entries with a cross
    reference next to them.
    I tried this by creating an index entry and typing (See
    "other topic name") next to it, but when I compiled the project
    this index entry was not included because I did not have a topic
    assigned to it.
    Is there any way to create a cross-reference index entry
    without a topic assignment? Or are there other workarounds that you
    use?

    Index cross references are designed to enable you to have
    index keywords that when clicked redirect the user to another
    keyword. For example I use them for acronyms to redirect users to
    the longer version. Are you cross references topics inside the
    project? If so, can't you use the index cross references by
    indexing in the same manner? If the cross reference you want is
    outside the project, using the index is not the way I'd suggest.
    Why not use a link in a topic to a URL, file, etc. You may be able
    to do what you want through a redirect topic but I haven't looked
    into this. Come back with some more details if I am off the
    mark.

  • Is it possible to add non-contiguous instances of a subform

    Hi there,
    Our staff may fill out a form with say, 10 repeated subforms ("add instance"), then need to go back and add another instance, not after record 10, but after record 3.  Or they may need to add records in alpha order.
    How can I set up the "Add Record" button so that the instance is added at that point in the form, rather than at the very end of the records?
    Am I explaining this clearly? They need to go back and add an instance in between other existing instances...
    Here's the form itself:
    Dropbox - AFBS_90-Plus_091814.pdf
    Many thanks to anyone who can help me build in this function to make our staff's life easier!
    Laura

    This is fantastic! Exactly the function we need. Thank you!!!
    Okay, so I have dumb-designer questions.  I'm entirely ignorant of how to use javascript, I'm just a layout person. Sometimes just by dumb luck I manage to adapt a script and make it work in one of my own forms, but I haven't made it happen with this one yet.
    Is there any resource out there I can read for how to adapt a piece of script? Like a process that needs to be followed in terms of identifying objects correctly?
    Sorry if it's a dumb question, it's been a while since I've tried to do anything with javascript and I'm not havin' any luck.
    Many thanks,
    Laura

  • Button makes subform visible, then adds another instance

    Hello,
    I have a button which makes a subform visible. That is working fine.
    I'd like the button when clicked a second time to add another instance of the same subform. Is this possible? I have no idea how to begin with the JavaScript for this and would appreciate help.
    Thanks in advance,
    MDawn

    Instead of making the subform visible and then adding instances you can do it just using instances then the button is doing the same thing.
    To "hide" the subform using instances, make sure under Binding that the Min Count is clicked off and the Inititial Count is set to 0 (zero) - your subform will now be hidden by default.
    Change the code you have showing the subform to use addInstance() instead of presence, using the underscore shortcut for the Instance Manager (you have to use the underscore method because the instance doesn't exist yet):
    _hiddenSubform.addInstance(true);
    If you remove instances back to zero then the subform will go away again. Doing it this way also has the advantage of resetting all the data in the subform.

  • IterateOverReachableObjects and soft/weak/phantom references

    Hi,
    what are soft/weak/phantom references for the JVM TI call IterateOverReachableObjects? Are those reference-objects
    1. ... "normal" objects having references and beeing traversed by this function
    (OR)
    2. ... interpreted as references with hiding the object nature
    (OR)
    3. ... ignored as they are ignored by the GC?
    Thanks,
    Robert

    The reference_kind with JVMTI_REFERENCE_FIELD, the referrer_tag will be the value of the tagged Reference instance, and the referrer_index will be the index of the "referent" field. It is this field that is treated in a special way by the GC.

  • Identify and remove a particular instance

    I need some assistance with this. I have a checkbox which creates an instance in a seperate form when checked. It creates, gives values to dropdown lists in that instance, and moves it to the end of all the previous instances just fine.
    I cant seem to get the removeal of this field to work when the checkbox is deselected. Since users have the ability to reorder instances I cant just remove the last instance, I need the removal to happen based on the value of the dllField when that value = "Text"
    Here is my code:
    //CheckBox value
    varValue=this.rawValue
    //Checkbox = unchecked
    if (varValue==0)
    //remove instance where ddlField = "Text"
    var instanceOCRRem = xfa.form.RicohStandardEDDForm.Page6.sub18ExportFieldedDataFields.subconcordancefields.sub Rows.subRow.resolveNode("subRow").ddlField.rawValue="Text"
    xfa.form.RicohStandardEDDForm.Page6.sub18ExportFieldedDataFields.subconcordancefields.sub Rows.subRow.instanceManager.removeInstance(instanceOCRRem);
    //Checkbox = Checked
    else if (varValue==1)
    //add instance, set the value of the ddlField and ddlECapField, then move it to the end of all the previous instances
    var instanceOCR = xfa.form.RicohStandardEDDForm.Page6.sub18ExportFieldedDataFields.subconcordancefields.sub Rows.subRow.instanceManager.insertInstance(1,true)
    var nIndexFrom = instanceOCR.resolveNode("subRow").index;
    var instanceCount = xfa.form.RicohStandardEDDForm.Page6.sub18ExportFieldedDataFields.subconcordancefields.sub Rows.subRow.instanceManager.count -1;
    instanceOCR.ddlField.rawValue="Text"
    instanceOCR.ddlECapField.rawValue="OCR Text"
    instanceOCR.resolveNode("subRow").instanceManager.moveInstance(nIndexFrom,instanceCount);

    You need a loop to go through the instances to find the one you want.
    I've uploaded a quick sample here:
    https://acrobat.com/#d=HCE5l51RbmjfxSkjGIZbDA
    I've just done one subform (subHolder) with a repeating subform inside it (subRepeat). It presents multiples of a repeating subform with the index displayed and a textfield that you can type into, if the value of the textfield is "text" it will remove that subform when you click off the checkbox.
    var vInstances = this.resolveNodes("subHolder.subRepeat[*]");
    if (this.rawValue == 1){
              subHolder._subRepeat.addInstance(1);
    else{
              for (i = 0; i < vInstances.length; i++) {
                        if (vInstances.item(i).TextField2.rawValue == "text"){
                                  vInstances.item(i).instanceManager.removeInstance(i);
    You can shorten your add routine by using addInstance() instead of insertInstance() + moveInstance() - addInstance() puts the object at the end.
    The underscore before the repeating object is a shortcut to the instanceManager.

Maybe you are looking for

  • Switching between 2 string values

    This is probably a trivial question, but how do I switch between 2 string values to be sent to one input terminal of a larger concatonated string function. The values need to be changed every 100ms or so. Thanks mhaque Solved! Go to Solution.

  • Correct DPI Scaling after docking/undocking requires Logon/Logoff

    Hi all, I am using a Surface Pro 3, when at my desk, I dock it with a USB3.0 Dock connected to two 24" monitors via DVI.  The desktop displays are 'standard' 24" 96dpi displays, while the Surface is running the 12" high-DPI display. I don't have the

  • "More than 10 entries found" message in overview screen

    Hi SAP Experts : When we click on the overview workcenter in the navigation bar, we get the following two messages : Why i am getting these two messages and how to stop them from coming. Thnks in advance...

  • Can I use a 4.6c backend system to integrate with DOE?

    Hi all, I need to know if I can use a backend system like 4.6c (R/3) to integrate it with DOE (Mobile 7.1) Is there any restrictions to use this backend version? Thanks Investiga

  • Will the latest 2 TB Time Capsule work with Windows 7

    I purchased a latest 2 TB Time Capsule My computer Engineer says, it will not work with my Windows 7 PC. He says I should purchase a Mac computer for using it My aim is to have some important files, movies and music files in it and use it as my  iPad