Cannot get removeInstance to remove the current instance

I have a form that contains a table inside a subform that I added a button to add additional instances of the subform that contains the table. Add instance works fine, however, I have also a button to remove the current of the subform that contains instance the table, and it does not work well. Keep remove the first instance of the subform rather than the current instance. For example, lets say the first table is to order product A, then the user can add another instance of the table to order product B and then add a third table to the product C command. Then, let the user didn't need the second table (product B) for a reason, so they click on the button on delete in the second table, but instead of removing the second table containing product B, it deletes the first table that contains produced.

I have the subform (OrderMain) defined to repeat with a minimum number of 1. The button to add an instance of the OrderMain subform contains the following code:

this.resolveNode('MasterSubform._OrderMain').addInstance (1);

If (xfa.host.version & lt; 8) {}

XFA. Form.Recalculate (1);

}

The button to remove the current instance of the subform has the following code:

this.resolveNode('MasterSubform._OrderMain').removeInstance (this.parent.index);

If (xfa.host.version & lt; 8) {}

XFA. Form.Recalculate (1);

}

I tried to adjust the parent index, but that did not work. I also put the code in the button Delete of table to view a message that contains the current index of parent and each instance returns an index of parent of 0. I use Adobe Acrobat XI to test the form. What I'm doing wrong here?

I have it. Finish by checking the relative path of the Remove button to the OrderMain subform. While the button Delete in a subform that is different, I have taken into account in the determination of the index of the OrderMain subform repeatable. Given that each "parent" refers to an another subform, I changed the code of the delete button for the following:

this.resolveNode('MasterSubform._OrderMain').removeInstance (this. parent.parent.parent.parent.index);

If (xfa.host.version< 8)="">

XFA. Form.Recalculate (1);

}

Tags: Adobe LiveCycle

Similar Questions

  • Helps to remove the current instance of Row1 of a Table.

    I have a table in which I have a line of Row1, header and footer line.  I have a button in the header which adds new instances of Row1.  There is a button in Row1 which is supposed to remove the current instance.  However, when I click the button to delete an instance, it always removes the first instance of Row1.  I used the wizard in Action to get the code for the button:

    this.resolveNode('Table9._Row1').removeInstance (this.parent.index);

    If (xfa. Host.version < 8) {}

    XFA. Form.Recalculate (1);

    }

    Any help would be greatly appreciated.

    Thank you

    J

    Hi, the code looks ok to me, but if your button is in a subform with a table cell, then you would have to use this.parent.parent.index in the removeInstance. Regards Bruce

  • Remove the current instance of a line in a table with formcalc using removeinstance

    I'm new on this and to find most of my answers with the help of Adobe or some other resources I have but this one left me speechless.  I have a table and a button to add lines.  After the lines are added and filled I need users to be able to delete some of them.  I have a delete button added to the last column of the table and the button strives to remove an instance of the table, the problem is that the instance that is being removed is evil, is always the first step on the line that the button is in.  If anyone can help, here's what I have:

    Table1._Row1.removeInstance (1)

    I know that 1 is not fair, but what I do to delete the current line that the button is.

    Thank you!

    Hello

    The setting for the done removeInstance() refers to the index of the repeat line you want to delete. This is a base zero index.

    If you replace the 1 in media with:

    This.parent.index

    It shoul work.

    See an example here: http://assure.ly/gk8Q7a

    Niall

  • Button to remove the CURRENT row in a table

    This test document has a table that works for most as I want, but the buttons Remove line always delete the second line , regardless of the button remove a row is clicked. The code is:

    Table1.Row1.instanceManager.removeInstance (1);

    How can I change this so that if you click on the button Delete line 5 (for example), it removes the 5 line, not of rank 2. It always clears rank 2, regardless of the button is clicked.

    Also, after I line is deleted, how can I get the lines of re - number automatically? The code for the automatic numbering is:

    this.rawValue = this.parent.index + 1;

    I tried to use this code:

    var number = detail.instanceManager.count;

    Detail.index + 1;

    numbers for automatic (by this blog entry by BR001), but I could never work on my table, although it works very well in his example. In the example of BR001, there a button Delete by rank and it always removes the line it is and it always automatically renumbers. I would use his method, but I spent hours trying to figure out where I am not to follow his example.

    Hello

    OK, your script will always clear the 2. instance as the removeInstance (1) simply means to delete the instance 1.

    You must keep in mind that all nodes have numbers index starting at 0.

    So the first instance of Row1 is addressed with Row [0], the second with the row [1]... the tenth line [9].

    To remove the current instance, you can use the button Delete as point of reference.

    This point of reference you're going upward in the tree of nodes to find the line desired.

    Table1.Row1.instanceManager.removeInstance(this.parent.parent.index);
    

    It = object current i.e. Button2

    parent = parent of Button2 which is Subform1

    parent = parent Subform1 which is Row1

    index = the number of the line pending

    OK, to keep the number of rows to update, you must use your line indexChange event (just add it after you existing script shading line).

    simple2.rawValue = this.index + 1;
    
  • Remove the same instance of two separate tables online

    Hi all

    I have two tables that each repeatable lines. Both tables must display almost the same information in each case of the line (I managed to code to link the values in specific cases of the lines). However, I added a button in the repeatable row, which allows the user to remove from the current instance of the line, so will they look back and realize that they do not need a line, they can take directly from the table. However, I can't seem to get the deletion affects the same instance of row of the second table. Is it possible to do this? I'm not terribly familiar with the instance Manager.

    Any help would be greatly appreciated. I just can't understand how to identify a specific instance of the repeatable row in table 2.

    Hello

    Removing instances in the event of an object that is inside the instance, you must ensure that you remove this particular instance at the end of the event.

    For example:

    If you delete the instance that the button is on the inside before finishing the entire event, the program will not recognize what event is to finish because you have removed it from the object that is triggered...

    You try here at the end of the code that no longer exists...

    I suggest that you still need to delete the instance (this) object at the end of any event to make sure to complete all your actions before deleting the object.

    I hope this helps!

  • My DVD has stopped working "cannot read DVDs Please decrease the current resolution.

    Original title: DVD

    My DVD has stopped working - error that says: cannot read DVDs Please decrease the current resolution and ensure that the connection of display type is taken care... Help!

    Hello

     
    What program you're using to play the DVD? Mention the name of the program?
     
    Try to play the DVD with Windows Media Player , and let me know if you get an error message.
    Play a CD or DVD in Windows Media Player
     
    Response with more information to help you.
  • How can I find my username and password for Windows xp media center? don't remember setting but cannot get back in after the restart.

    How can I find my username and password for Windows xp media center? don't remember setting but cannot get back in after the restart.

    Hi Carol_971,

    1. Did you the latest changes on the computer?
    2. You have security software installed on the computer?

    Method 1

    I suggest that you try to start in safe mode and then try to log on to Windows using the default Administrator account and then remove the password for your account, check if it helps.

    A description of the options to start in Windows XP Mode

    http://support.Microsoft.com/kb/315222

    Method 2

    If you are unable to log on to Windows in safe mode, refer to the article below and then try the steps mentioned, check if it helps.

    How to connect to your Windows XP-based computer if you forget your password or if your password expires

    http://support.Microsoft.com/kb/321305

  • Access the current instance of request module in a java class in the model

    Hi all
    I'm trying to implement the custom story types in our application, (ModifiedById), I can read the user name of the security context, but not the username.
    I have a view object, say UserInfoVO which contains the logged in users info.
    I know, I can create a new instance of the application at the bean module and using security context information, I can go get the user ID.
                ApplicationModule am =
                      Configuration.createRootApplicationModule(amDef, config);
                    ViewObject vo = am.findViewObject("UserInfoVO1"); // view criteria applied by default
                    vo.setNamedWhereClauseParam("bUserName", user); // user from security context
                    vo.executeQuery();
    I'm trying to access the current instance of the Application module in my java class customized, that is used to return the attribute history ModifiedById.
    //referring the blog
    
    http://jobinesh.blogspot.in/2011/02/creating-custom-history-types.html
    It is, how do I access the current instance of ApplicationModule in a class as * "HistoryAwareEntityImpl" * located in project template. ?

    any help will be appreciated.

    Kind regards
    Rognard

    OK, in this case, you get the transaction of db of the base class object and this object allows you to search the module of the application

    public final DBTransaction getDBTransaction();
    ...
    DBTransaction:
    public ApplicationModule findApplicationModule(java.lang.String amName)
    

    or if you get the application root module

    public ApplicationModule getRootApplicationModule()
    

    Timo

  • Trying to access the electronic books in the library of our audience. Downloaded the software, but I get an error saying: the current version of the security of MP's 2.5.0.0 and I need 2.

    Trying to access the electronic books in the library of our audience. Downloaded the software, (Overdrive Media Console) but I get an error saying: the current version of the security of MP's 2.5.0.0 and I need 2.5.0.1. How to do only what I can read ebooks? People have suggested using IE, but I prefer to much HELP Firefox!

    Try to update the media player while using Internet Explorer. Windows Updates site uses ActiveX to perform "duties. Firefox does not support ActiveX.

  • Cannot get CF11 to download the free trial version for students.  Anyone having the same problem with the Adobe site?

    Cannot get CF11 to download the free trial version for students.  Anyone having the same problem with the Adobe site?

    Hello

    Please download from http://www.adobe.com/cfusion/tdrc/index.cfm?product=coldfusion&promoid=DJDUK use your Adobe ID and password to login and download CF11.

    Let me know in the case where you are facing any problems during the download, if you get any error try another browser.

    Thank you

    Priyank

  • Cannot get new url of the tab open with the homepage (Google).

    After the upgrade, I cannot get rid of 12 boxes (Facebook, Youtube, etc.) on the new tab or make open with my homepage (Google). I tried two different newtaburl add-on, uninstall and reinstall Firefox and the directives of the object: subject: config, browser.newtab.url, etc. I can't even scratch try this approach. I can't get the 12 bar blues.

    Well, I know I'm repeating something you've read before, but just for completeness (and also, I suspect this isn't built-in Firefox page):

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste newtab and make a pause so that the list is filtered

    (3) double-click the preference browser.newtab.url and enter your favorite page:

    • (Default) page thumbnails = > subject: newtab
    • Blank tab = > subject: empty
    • Built-in Firefox homepage = > topic: welcome
    • Any other page = > full URL of the page

    Press Ctrl + t to open a new tab and check that it worked. Fixed?

    Some traps:

    If Firefox will not let you change this setting: you can have what is called SearchProtect on your system.

    Firefox if allows you to save your changes, but he doesn't know: one of your extensions may be the substitution of her. You can consult, disable and/or remove extensions on page modules. Either:

    • CTRL + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click on Extensions

    If the modification works during your session, but during the next startup is return to the unwanted page: you could have a user.js file in your personal settings Firefox (your Firefox profile folder). This article describes how to track down and delete the file: How to fix preferences that will not save.

    A little luck?

  • Cannot get active document when the user clicks on the document in Adobe FM 2015.

    I am facing the following problem:

    I have a timer in my application that strikes several times after 2 seconds to get the name of the current document (if there is).

    If the user selects text (the click of the mouse down) of the current document in Adobe FM 2015 then the following API call returns 0 (which is false):

    F_ApiGetId (FV_SessionId, FV_SessionId, FP_ActiveDoc)

    Later, if the user leaves the mouse (click of the mouse to the top) then in the next hit of the timer the document name is extracted.

    It seems that the Adobe FM 2015 cannot manage simultaneously the two entries of the user of the application and the API in my application calls.

    Why is this happening?

    It seems that Adobe FrameMaker 2015 cannot handle at the same time user UI events and FDK API calls from external applications.

    When user interacts with the application FM calls API FDK for my failure in the external application with error codes.

  • Remove the current read help page!

    Hi, I've created a form that adds a new instance when I click on a button with the click script

    "Mysubform.addinstanceManger.addInstance (1);

    This copy of my complete form to a new page which is what I want.

    However, when read in on the web, I want to create a delete button that deletes the current page, the user is veiwing if they decide they want to.

    example, if the first form is completed and they click on the add new page and fill out the second form and click again if they need to fill another.

    Now, if for example they have created 4 pages and decide they want to delete say, page 2 or maybe 3. but keeping other pages with the information already entered. How to create a button that deletes the current page, they choose to remove it.

    Detaiiled any help would be greatly appreciated! as I am new to scripting and LC.

    Very strange. I think I have it right this time.

  • How to remove the current firefox download icon

    I want to just the Home icon, nothing else. For some reason the current icon download is in place and I have no idea of what drove to view it, but I hope that I can remove it from the screen.

    Move this icon in the Palette to customize.

    https://support.Mozilla.org/en-us/KB/customize-Firefox-controls-buttons-and-toolbars

  • HP 110 min: pls, am havin problem abt to remove the current password hp 110 min

    Hello
    am having problem remove current password in hp 110 min

    princytex wrote:
    Hello
    am having problem remove current password in hp 110 min

    Hello

    remove the BONES ' password or BIOS password?

Maybe you are looking for