Add/Remove instance manager issues

My add instance button is working as intended.
The remove instance button is working, but not as I would like it to. The instance it removes is not necessarily the last instance added, as I would like. When "clicked" it removes the second instance listed. This is a problem when you add 5 or so instances, and need to remove the last one, and end up having to remove all of them because removing the #2 instance just messed up the order of instances.
If this is not making sense I can show you what I'm referring to by uploading/sending interested parties the form.
Here is the "click" event javascript code. I adopted the code from the remove instance manager example, maybe I did not convert it correctly to my form. Not sure why it deletes from the first instance down, instead of last instance up. Any help is appreciated.
var nNumSub = 0;
var nSubLength = Subform1.nodes.length;
for (var nCount = 0; nCount < nSubLength; nCount ++)  {
     if (Subform1.nodes.item(nCount).className == "subform"  {
          nNumSub = nNumSub + 1;
nNumSub = nNumSub - 1;
if (nNumSub < 1)  {
    xfa.host.messageBox("The minimum allowable number of subforms is 1. You cannot remove any more subforms.", "Warning", 3);
else {
     Subform1.Subform2.SubformImpression.instanceManager.removeInstance(nNumSub);
Thank you,
B

Paul,
So I want to do the same thing, but my instance manager set-up is much simpler:
form1.QuickNoteGathering.Data.Button1::click - (JavaScript, client)
Data.Info.instanceManager.addInstance(1);
So what code would I use to have a button that removes the last instance added?
Also, I want the instances to continue on to several pages if needed (i.e.: my outlay is just a small sample and one can add as many additional information layers as they need). But it all goes awray as it comes to the buttom of the first page. So I can I assure that as you click the add additional info, it will persist to as many pages as needed?
Thanks. I can send you the form if you need me too, since there is no upload anymore to this forum.
thanks
Shai

Similar Messages

  • Problem with working with add/remove instance incorporating checkbox

    I have come into a problem I have been trying to figure out for the past week. I had googled for some guidance yet I found nothing useful.
    Currently, I have a table which has an addinstance button and removeinstance button. The script for these work.
    What I am looking to do is the row starts off being in readOnly format and when I select a checkbox, one of the cell will become open ( I have a table with 12 cell in a row and about 6-7 checkboxes which will open certain cells). However, when I add an instance and one of the checkboxes is checked…the next row is still readOnly. How do I target those certain cells? if I have a checkbox checked and I add a new row..those certain fields will be open for all the cell in that column.
    If anyone could assist me, that would be great.

    This should get you going I think.
    I just worked with the "Additional Lines" checkbox and the "Add" checkbox in the table, you'll need to copy and adjust the scripts for the other objects.
    Script is on the Change event for "Additional Lines". This script will loop through the rows and toggle access on all of the matching fields, in this case the "addcb" field.  Don't know if that's what you need or not, but I did it in case someone has already added some rows and then decides to click the "Additional Lines" checkbox:
    if (this.rawValue == 1)
        var vFields = xfa.resolveNodes("form1.Subform4.Table1.Row1[*].addcb");    
        for (var i=0; i <= vFields.length-1; i++)
            vFields.item(i).access = "open";
    else
        var vFields = xfa.resolveNodes("form1.Subform4.Table1.Row1[*].addcb");
        for (var i=0; i <= vFields.length-1; i++)
            vFields.item(i).access = "readOnly";
    Script on the Initialize event of the "addcb" field. This script checks the "Additional Lines" checkbox to see what access the field should have when it is created:
    if (Subform1.additionallines.rawValue == 1)
        this.access = "open";
    else
        this.access = "readOnly";
    Hope that helps!

  • How do I add removed skype manager back

    Hi,
    I accidentally removed my skype manager, so how can I add it back? I received the email saying if this is done by accident, please contact the skype manager immediately, however, I don't even know how to contact the skype manager. Any help please?

    Hi,
    If you are referring to your American number then I suggest you to place a new order and just search it
    It is free so if you are lucky you will get it
    Good luck!
    If my answer helped to fix your issue, mark it as a Solution to help others.
    Thank You!
    Please send private messages only upon request.

  • Remove "Add New Instance" and "Remove New Instance" Entity buttons

    Hi,
    While Adding new Entity, "Add New Instance" and "Remove New Instance" buttons will be displayed.
    I don't want to display "Add New Instance" and "Remove New Instance" because by default i have created instances. I am able to disable it but i don't want to display at all.
    For "Add New Instance" , one-to-one, Automatically disabled by OPA
    For "Remove New Instance" added below code in ButtonControl.vm:
    #if( ${control.getButtonClass()}.equals("remove"))
    #set( $disabledString = "disabled" )
         #set( $visibility = "false" )
    #end
    Please tell me how to not display these two buttons.
    Thanks,
    Sri

    Hi Sri and Patrick,
    There's no out-of-the-box configuration to hide the Add/Remove Instance buttons from entity collect screens in Web Determinations. However, this requirement can be achieved through Custom Properties. This requires a technical person to create the custom property, which the rulie then attaches to the Rule Project. The technical person also needs to modify the velocity template which renders the entity collect screens so that it will remove the Add/Remove buttons on any entity collect control where the custom property is set to True.
    I can't advise on exactly how to write the custom property or edit the velocity template (I'm a functional expert, not a programmer), but the OPA Developer Help should have guidance. Try searching on ‘custom property’. From the rulie perspective, have a look at this article for how to attach a custom property to the project and to the particular screen control:
    * Augment the rulebase with metadata: http://docs.oracle.com/html/E24270_01/Content/Integrating/Augment_the_rulebase_with_metadata.htm (particularly the sections 'Specify a custom property defintion' and 'Assign a custom property to a control'). This link is to the 10.3 version of the OPM Help. If you are using an earlier release of OPA, you can look at the equivalent article in your copy of the Help.
    (If there are technical people following this thread, perhaps you could reply with specific OPA Developer Help articles people should look at with regard to writing custom properties?)
    Cheers,
    Jasmine

  • Remotely add and remove Instances from different pages

    Similar to my other post, I have a form that has multiple pages, one being a calculator (OA_CALC) that shows every variable for calculation; the second (OA_PG1), customer facing showing only pertinent information. So both tables should add/remove and show the data being contolled from OA_CALC. I am able to addInstance and source the date to both pages, but for some reason removeInstance only works on the page where the button exists. So rows on OA_PG1 never delete, please advise.
    On OA_CALC i have an ADD ROW button with the following code:
    form1.OA_CALC.Table1.HeaderRow.#subform[0].AddRow::click - (JavaScript, client)
    OA_CALC.Table1.RowItems.instanceManager.addInstance(1);
    OA_PG1.ProjectSavingsGROUP.Table1.RowItems.instanceManager.addInstance(1);
    and a DELETE ROW with the following code:
    form1.OA_CALC.Table1.RowItems.#subform[0].DelRow::click - (JavaScript, client)
    var vIndex = this.parent.parent.index;
    OA_CALC.Table1.RowItems.instanceManager.removeInstance(vIndex);
    OA_PG1.ProjectSavingsGROUP.Table1.RowItems.instanceManager.removeInstance(vIndex);
    One thing that I tried was creating buttons on OA_PG1 with the code specific to that table, that seemed to work. So I know the syntax works, but cannot figure out how to control it from a different page. Please help.
    Thanks

    urgh, apparently I am still very close. I have used your sample, but it seems that the execEvent("click") is not working correctly or my syntax is wrong somewhere. Where am I going wrong?
    Button Code on first table:
    form1.OA_CALC.Table1.RowItems.deleteBtn::click - (JavaScript, client)
    var vCurrentRow = this.parent.index;
    OA_CALC.Table1._RowItems.removeInstance(vCurrentRow);
    xfa.resolveNode("OA_PG1.ProjectSavingsGROUP.Table1.RowItems[" + vCurrentRow + "]").deleteBtn.execEvent("click");
    Invisible Button Code on second table:
    form1.OA_PG1.ProjectSavingsGROUP.Table1.RowItems.deleteBtn::click - (JavaScript, client)
    OA_PG1.ProjectSavingsGROUP.Table1._RowItems.removeInstance(this.parent.index);
    Edit: Here is the Console report from the Acrobat JavaScript Debugger:
    xfa.resolveNode("OA_PG1.ProjectSavingsGROUP.Table1.RowItems[" + vCurrentRow + "]") is null
    7:XFA:form1[0]:OA_CALC[0]:Table1[0]:RowItems[1]:deleteBtn[0]:clickException in line 7 of function top_level, script XFA:form1[0]:OA_CALC[0]:Table1[0]:RowItems[1]:deleteBtn[0]:click
    TypeError: xfa.resolveNode("OA_PG1.ProjectSavingsGROUP.Table1.RowItems[" + vCurrentRow + "]") is null
    7:XFA:form1[0]:OA_CALC[0]:Table1[0]:RowItems[1]:deleteBtn[0]:click

  • Issue with the Instance Manager !

    Hello,
    I have schedule a report, where it will generate a .pdf file and save in the specfic folder every day.
    Today when i see in Instance Manager the report schdule status was failed but still i recieved my .pdf file.
    Error Message: The Web Intelligence server is busy. Save pending changes, and try again later. Please contact if the problem persists to the BusinessObjects administrator to continue. (Error: ERR_WIS_30284).
    How can this be possible? Please help? Why instance manager is showing failed status?
    Regards,
    Bhavesh

    Hi
    When the schedule job was stated WebI Server may be busy, after some time(Webi Server is Free)  job might be run and you  have received …
    I think you have schedule the Job adjusted some parameters to increase the
    1) Number of retries allowed
    2) Increase the time intervals

  • Please help with Instance Manager

    Hello,
    I created a button that will show/hide a subform. The issue is I need multiple buttons like this. I thought changing the name of the subform in this script would allow me to use another button for a different subform. For instance, Instead of using the word Alabama I could replace it with Alaska and it would show/hide that subform. Could having multiple pages in a subform affect its functionality? Please Help!
    // Invoke the Instance Manager to add and remove the alabama subform.
    if (fAlabama.value == "0") { // fAlabama is a document variable used as a flag.
    // fAlabama = 1 when the alabama subform is displayed.
    _alabama.setInstances(1); // Add the comments subform.
    this.resolveNode("caption.value.#text").value = "Clear Alabama"; // Change the button's caption.
    fAlabama.value = "1"; // Set the flag value.
    else {
    _alabama.setInstances(0); // Remove the alabama subform.
    this.resolveNode("caption.value.#text").value = "Add Alabama"; // Change the button's caption.
    fAlabama.value = "0"; // Reset the flag value.
    Thanks,
    Venus

    When you say you are not in standalone mode, I assume you are connecting to an Oracle Management Server which is running somewhere in your network. You need to discover your node. To do this you must start the intelligent agent on the server where you have your database. Then from the OEM console select navigator from the menu bar, and then discover nodes. Next enter the name of your server. OEM will attempt to contact the intelligent agent on that server in order to get the database information.

  • Which adobe to use, I was told to down load the newer version and the add/remove folder says I have 10.1.82.76, is tehis the one I need?

    The latest update from Firefox said I HAD to update Adobe or there would be a security problem. I replied to the answer about the edit bar, but have not received a reply:
    This is what I wrote:
    Thank you for helping me. I had no idea how to do that. Now if you can tell me about the adobe issue I would so appreciate it. I do use Firefox and I went to add/remove to see which version and could not find the Adobe 10.1.82.76 it said I had??? Then I just went back and it is there. I was told I HAD to update the Adobe because of a security issue, but when I went to add it, it said warning the program I was about to add might be dangerous????? So I have it on the down load thing, I have not told it to run, but it shows up in my add/remove folder and I am SO confused??? Do I need to run it? I went to the adobe site and found it when I could not find the "edit" button. I am not sure if I have the right version. It said certain versions would not run with Firefox and I do not want to mess up my computer.
    Please advise
    Sheila

    Your above posted system details show outdated plugin(s) with known security and stability risks.
    # Shockwave Flash 10.0 r32
    # Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/

  • SQL Server Utility - How to Remove Instance that No Longer Exists on Server

    I had a default instance that I had installed for an application.  But then I was told they wanted it as a named instance.  I had added the default instance to the UCP (SQL Server Utility).  I have uninstalled the default instance forgetting
    that I had added it to the UCP.  Now when I try to remove the managed instance I get the following error:
    The action has failed.  Step failed.  The SQL Server connection does not correstpond to this managed instance object.  (Microsoft.Sqlserver.Management.Utility)
    How do I remove the managed instance from the UCP?  Do I need to go into a table in database sysutility_mdw and delete something?
    select * from msdb.dbo.sysutility_ucp_managed_instances
    where instance_id=57
    Maybe delete from table msdb.dbo.sysutility_ucp_managed_instances?
    Or maybe table sysutility_ucp_managed_instances_internal?
    lcerni

    I ran this
    EXEC msdb.dbo.sp_sysutility_ucp_remove_mi @instance_id=57
    And it fixed the issue.
    lcerni

  • Add Subform Instance

    Hi there,
    Would it be possible for someone to help with a problem I'm having trying to add a subform instance? I've looked at an example and tried to use the same method but for some reason cannot get it to work and I've no idea why! Happy to send the form if that helps.
    Any help greatly appreciated,
    Thanks.
    Ken

    //_<subformname>.addInstance(1); //is syntax do not get confused it starts with underscore followed by subform name (no need to give entire hierarchy)
    //and the number 1 in the parenthesis adds one instance if use 2 two new instances are added
    //check the example below
    // Invoke the Instance Manager to add one instance of the detail subform.
    _Section2Detail.addInstance(1);
    //Invoke the recalculate method to include the field values from the added subform in calculations.
    //add to forec the layout manager to redraw screen
    xfa.form.recalculate(1);
    if you still run into issues do email me copy at n_varma(AT)lycos.com.
    Good luck,

  • Resolve Nodes - For Loop - Instance Manager Please Help

    Hello,
    I made a table in lifecycle designer that uses the instance manager to add rows.
    I want to write code that will loop through each of the instances and perform a comparison.  I would like the code to examine the index field.  If the index field = 2,  then return the value of the num amount field.
    This is what I have tried so far and it does not work. 
    var
     var
    var
    oFields = xfa.resolveNodes("Subform1[*].index1");
    var     
    nNodesLength = oFields.length;
    for     (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++)
      if (oFields.item(nNodeCount).rawValue ==2)     {
         form1.#subform[2].Table5.Row5.NumericField1.rawValue
         = form1.Page1.Subform1.Capital1.Capital1.detail.numAmount.rawValue;}
    break;    

    Here is a more lengthy definition of my problem.   I hope someone can help. 
    1.     I have a table that will allow the user to add rows when they click the plus button.  Here is the code
    ----- form1.Page1.Table7.#subformSet[0].#subformSet[1].detailHeader2.Button2::click: - (JavaScript, client)
    _detail.addInstance(this.parent.index);
    //Invoke the recalculate method to include the field values from the added row in calculations.
    xfa.form.recalculate(1);
    2.     The table also has a button to delete rows.   Here is the code
    ----- form1.Page1.Table7.#subformSet[0].detail.Button2::click: - (JavaScript, client) --------------
    // Invoke the Instance Manager to remove the current instance of the detail subform.
    _detail.removeInstance(this.parent.index);
    // Invoke the recalculate method to update the form calculations.
    xfa.form.recalculate(1);
    3.     The table has a drop down list named txtPartNum and that allows you make a selection.  Once you have made the selection a script populates other fields in the same row. The Drop Down list contains this code:
    ----- form1.Page1.Table7.#subformSet[0].detail.txtPartNum::initialize: - (JavaScript, client) ------
    // Populate the part number Drop-down List.
    partNoScript.populatePartNo(this);
    ----- form1.Page1.Table7.#subformSet[0].detail.txtPartNum::change: - (JavaScript, client) ----------
    // Populate the description and the unit price when we change the part number.
    partNoScript.getDesc(xfa.event.newText, txtDescription, numUnitPrice, index1);
    4.     The following script populates the following fields:
    txtPartNum,
    txtDescription,
    numUnitPrice,
    index1
    ----- form1.#subform[2].#variables[0].partNoScript::partNoScript - (JavaScript, client) ------------
    // This script object controls the interaction between the part number, description and unit price fields.
    // When you fill the partNo, partDesc and partPrice arrays, make sure they have the same number of array indices in
    // each array i.e. for every part number, there should be a matching description and price.
    // Array of part numbers.
    // This script object controls the interaction between the part number, description and unit price fields.
    // When you fill the partNo, partDesc and partPrice arrays, make sure they have the same number of array indices in
    // each array i.e. for every part number, there should be a matching description and price.
    // Array of part numbers.
                         var partNo = new Array(" ",
                                                                    "Company Labor - Regular Hours",
                                                                    "Company Labor - Overtime Hours",
                                                                    "Company Engineering - Regular",
                                                                    "Company Engineering - Overtime",
                                                                    "Company Burden",
                                                                    "Subcontract Labor",
                                                                    "Subcontract Engineering",
                                                                    "Subcontract Material",
                                                                    "Subcontract Equipment",
                                                                    "Subcontract Labor & Material Bid",
                                                                    "Purchased Materials",
                                                                    "Materials from Inventory",
                                                                    "Transportation Equipment",
                                                                    "Miscellaneous Tools Shope and Garage",
                                                                    "Construction Equipment",
                                                                    "Rental Equipment",
                                                                    "Permits",
                                                                    "Legal Fees",
                                                                    "Other Miscellaneous");
    // Array of part descriptions.
    var partDesc = new Array(" ",
                                                                    "1221.9922",
                                                                    "1222.9922",
                                                                    "1221.9922",
                                                                    "1222.9922",
                                                                    "1221.9922",
                                                                    "1232.9933",
                                                                    "1232.9933",
                                                                    "1232.9933",
                                                                    "1232.9933",

  • Removing Instances With a Button

    Hello,
    Any help would be greatly appreciated
    I am creating a form that has several headings, under each heading I have set up and instance in a sub form that allows the user to add another line/instance to the document. This is working fine, however I would like the end user to be able to delete/remove that same instance they have just added if they would like. The problem is that I have several sub forms in this document and trying to get the remove button to work is proving to be difficult.
    The current script I am using to add and instance is
    if(gc.instanceManager.count < 15){
    gc.instanceManager.addInstance(1);
    }else{
    xfa.host.messageBox("The maximum number of Items that can be added is 15.");
    which is working just fine...I have added a remove button with several different scripts, and the problem is that if the end user adds a instance to the 5th heading( also the 5th sub form), in order for the user to then be able to remove that instance he/she has to add at least 5 instances to be able to remove them, and if they add an instance to the 6th heading they then have to add 6 instances to the heading before they can delete them...weird.
    The script I have been using to remove the instances is...
    gc.instanceManager.removeInstance(1);
    or
    if(ss.instanceManager.count > 1)
    ss.instanceManager.removeInstance(1);
    both with the same outcome.
    If anyone has had this problem or knows the correct way to fix this problem please let me know.
    Aaron

    I Have fixed my problem...
    I had my buttons in a subform with the same binding for each heading so renaming them fixed the issue.
    Aaron

  • Removing Desktop Manager from Windows7 XP Mode Autostart

    Hello,
    I installed the Desktop Manager on Windows 7 XP Mode and chose to run it on system start. Now I think this was a bad choice and want to remoce it from Autostart, but I don't know how. Please help!
    hagen

    Hi there!
    As I recall, that option (auto start) can only be changed by a complete removal and re-installation of DTM. Here is a procedure:
    I suggest the following steps (insert plenty of reboots of your PC...not just restarts, but full power down reboots). Also, it is advised that you be logged into the PC on an account with full admin rights. Further, under Vista, use the "Run As Administrator" option for everything.
    1) Remove your device OS update package from your PC (add/remove programs)
    2) Cleanly uninstall the RIM DTM software:
    KB02206 How to perform a clean uninstall of BlackBerry Desktop Software
    3) Get a fresh download of the RIM DTM software:
    https://www.blackberry.com/Downloads/entry.do?code​=A8BAA56554F96369AB93E4F3BB068C22
    Choose the version that is newest and (if applicable) compatible with your PIM (if you are synchornizing via USB):
    KB12268 Applications supported by BlackBerry Desktop Manager for synchronization
    4) Download (to your PC) a fresh copy of your device OS package from your carrier:
    http://na.blackberry.com/eng/support/downloads/dow​nload_sites.jsp
    5) Install DTM to your PC
    6) Install (also to your PC), the device OS package
    7) Start the organizer configuration over:
    KB17022 How to configure organizer applications for synchronization using BlackBerry Desktop Manager
    Hopefully that will get things going again.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

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

  • Report- Software registered in Add Remove Programs on a specific computer report showing uninstalled / removed/ upgraded applications

    I am facing issue with report "Software registered in Add Remove Programs on a specific computer"
    Almost all systems in my environment upgraded from MS Office 2007 to MS Office 2013 long back but whenever I pull report from SCCM 2012 r2 report name
    "Software registered in Add Remove Programs on a specific computer"
    is still showing MS office 2007 components in report same with other applications like Adobe Acrobat etc...
    I crossed checked on client system & didn't find MS Office 2007 & old adobe acrobat version in Add remove programme....
    SCCM Administrator

    Yes I manually triggered HW Inventory & SW Inventory
    cycle via the Configuration Manager Control Panel Applet.....
    SCCM Administrator

Maybe you are looking for