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,

Similar Messages

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

  • Add Subform dynamically,on click of Button, in Interactive form generated by Adobe Document Services

    HI,
    I have an XDP file designed by Adobe Designer 7.1 with the following hierarchy of elements:
    -form1(root)
    --Button
    --tmpForm (subform - Repeat subform for each data entry )
    ---ST (Text)
    Now, this XDP file generates an Interactive PDF form with Reader Rights enabled by the Adobe Document Services.
    On click of button, the following javascript is executed on client side:
    var df = _tmpForm.addInstance(1);
    df.ST.rawValue = "HI" ;
    xfa.host.messageBox( "Instances" + tmpForm.all.length ) ;
    On clicking the button, i get the length of the instances of the subform and the size increases on each click, but no element is added "visibly" to the pdf.
    But when i try to do the same by saving the XDP file as Dynamic PDF form for Acrobat 8.0,and open it using Adobe Acrobat PRO 8.0, it works fine.
    My question is,I s it not possible to add subforms dynamically in PDF's generated by Adobe Document Services with Reader Rights enabled?
    Or, is there something that i am missing?
    Please guide.
    Thanks.
    Regards,
    Siddhartha

    Hi,
    you can't change the behavior of the save button in the browser nor in Reader/Acrobat.
    You can add a custom button within your form which calls a custom script from a folder level script using the browserForDoc method.
    The browseForDoc methos is the only one whcih can change the name in the saveAs dialog.
    Here's an example., you can run from Acrobat console.
    You need to combine it with the solution from the other thread to make it work with your form.
    http://forums.adobe.com/message/2266799#2266799%232266799
    var oRetn = app.browseForDoc({
        bSave: true,
        cFilenameInit: "MyForm.pdf",
        cFSInit: "",
    if (typeof oRetn !== "undefined") {
        this.saveAs({
            cFS: oRetn.cFS,
            cPath: oRetn.cPath,
            bPromptToOverwrite: false

  • Add Subform dynamically,in Interactive form in WebDynpro

    HI,
    I an using NW2004s SP9  and have an Interactive form designed by Adobe Designer 7.1 from within the NetWeaver Developer Studio, with the following hierarchy of elements:
    -form1(root)
    --Button
    --tmpForm (subform - Repeat subform for each data entry )
    ---ST (Text)
    The Webdynpro application displays the Interactive PDF form with Reader Rights enabled by the Adobe Document Services.
    On click of button, the following javascript is executed on client side:
    var df = _tmpForm.addInstance(1);
    df.ST.rawValue = "HI"  ;
    xfa.host.messageBox( "Instances" +  tmpForm.all.length ) ;
    On clicking the button, i get the number of the instances of the subform and the size increases on each click, but no element is added "visibly" to the pdf.
    But when i try to do the same by saving the XDP file as Dynamic PDF form for Acrobat 8.0, and open it using Adobe Acrobat PRO 8.0, it works fine.
    My question is,I s it not possible to add subforms dynamically in PDF's generated by Adobe Document Services with Reader Rights enabled?
    Or, is there something that i am missing?
    Please guide.
    Thanks.
    Regards,
    Siddhartha

    HI Dezpo,
    Thanks a lot for replying.
    I had checked the updated <b>SAP Note 834573</b> -Interactive Forms based on Adobe software: Acrobat/Reader version, which states that:
    For SAP Interactive Forms by Adobe, you require the following:
    Adobe Acrobat as of Version 7.0.9
    Adobe Reader as of Version 7.0.9
    <b>Important:</b>
    Note that you can only have limited use of Reader 8.0 for forms that, at runtime, are integrated in a WebDynpro application through the xACF technology (Active Components Framework). In this runtime environment, Reader 8.0 currently only supports static interactive forms. If you are using <b>dynamic interactive PDF forms</b>, we recommend that you use <b>Reader 7.0.9.</b> In the application, you can use parameters, or you can call methods, to determine whether you want to create a static or dynamic PDF form.
    I tried with the reader versions - 7.0.7,  7.0.9 and 8.01, but it doesn't work for either of them.
    Regards,
    Siddhartha Jain

  • Problem: Adding subform instances

    Hello,
    I'm trying to add some instances of a subform.
    Therefor I added the Instance Control Button to my form.
    I customized it to my form and tested it.
    But when I click the Button, nothing happened. After 5 times, a message opened, that I have reached the limit of instances. But no instance is visible.
    What could be the problem?
    Alternative: Can I programmatically change the minimum count of repeats of the subform? It's possible that I could calculate, how much lines I need. So that is the second chance.

    I solved my problem.
    The reason that instances that were added did not show is because there were positioned subforms below where I was adding instances and they covered up new instances because they did not move.
    I solved the problem by re-organizing the form.
    1. All objects were put in a positioned sub-form. Some of them were in a subform by themselves.
    2. Each positioned subform was wrapped in a flowed subform with flow direction Western Text. The flow direction probably doesn't matter here because the flowed subform has only one object in it.
    3. The page-level subform was made flowed, direction western text.
    4. The form must be saved as a dynamic form.
    When I added instances, everything moved down correctly.
    You can probably not wrap everything in positioned subforms first, but you have to account for LiveCycle left-justifying everything in flowed subforms by putting blank text boxes to act as spacers to keep fields in place.

  • Adding subform instance - paging issue

    Hi,
    I have a form which includes a subform where one can press a button to add a subform instance.
    The subform is located in the middle of the page, with a small subform below it. 
    When I presss the add button to add the subform, the subform below the added subform goes to a new page.  I don't know why its doing this as there is plenty of room below the lower subform before the end of the page.
    I recently added data fields to the form.  Before I added the data fields, when I would press the add subform button, the subform below would not go to a new page.
    Any ideas?
    Andrew

    Just a thought but does your form content area extend to the bottom of the page or does it end at the same place the bottom subform ends?

  • Set Focus target when Add New Instance

    [LC Designer ES2 9.0] Using Action Builder to add a new instance of subform SITE, where first field is called SiteName.
    If I set action to Set Focus to SiteName, the focus goes to the *original* SiteName field instead of to the new instance.
    Users will typically add a number of additional sites and, each time, I want the focus to be set on the first field of the newest instance, not the original instance. How do I accomplish that? Thanks!           ~Carol

    I understand the concept (I think...), but am not clear on where to place the code.
    I used Action Builder to create an AddSite action: when check box chkAddSite is checked | Add a new instance of subformSiteInfo | and set visibility of subformSiteInfo to visible. Does your code go in that same action sequence? If so, what is the next Action Builder result selection? If not, where do I insert it?
    I never know whether the new instance of the subform will begin on the following page, so the user might keep clicking the chkAddSite box, thinking it didn't work. Although, thinking this through, maybe I could force the new subform instance to always appear at the top of the following page, and somehow direct the focus there, rather than to the specific first field???
    Thanks!         ~Carol

  • ADF: want to add multiple instance of .jsff page in af:region dynamically

    Hi,
    I am having following requirement.
    We have one .jsff page, and we want to add multiple instance of this fragment page in <af:region> at runtime.
    Basically our requirement is anyhow we want to add multiple panel which is having many other child component at run time.
    Your suggestion will be very helpful.
    Regards,
    Deepak Parmar

    Vinod,
    Hmm.. only option left is i should add component at run time. but i am facing following issue...
    I am trying to add child component into RichPanelStretchLayout object at runtime, but getFacetCount() and getFacet() method of RichPanelStretchLayout is returning 0 and null respectively.
    can you please suggest me how can i add child component into RichPanelStretchLayout object?, i have directly added component using getChildered.add() method. but it wont work as i must need one facet object ( either START,BOTTOM or CENTER).
    Regards,
    Deepak

  • Remove subform instance problem

    HI there
    I am using the following code to remove the last subform instance
    subform.instanceManager.removeInstance(1)
    However in test it appears to be removing the last instance but one.
    Can anyone help me fix this.
    Thanks
    Darren

    Hi Paul
    Many thanks for your quick response.  When I added that to my form it removed the first instance rather than the last instance.  I had a look on the links here and for any one else that has a similar prob the following seems to have fixed the problem
    subform.instanceManager.removeInstance(subform.instanceManager.count-1)
    Thanks again
    Darren

  • Subform instances problem

    I have a subform that reads data from an XML data file.
    For every instance of an XML data elelment - I want a new instance of the subform with the associated data -
    I cannot seem to get this to work - after many attempts.
    from the Live Cycle UI - The for It appears to be working , at least, the bindings are correctly indicating the right information for the subform - but the object palette is grayed out and I can't seem to figure out how to instruct the subform to re-instantiate for every occurrence of a particular XML data element.  It reads the first element encountered , one only .... and misses all other occurrences of the data element.
    would it be possible to zip up the form and the xml data file and submit it for a review -
    the form is actually rather simple - so this is even more frustrating  (Arggh)
    Thanks

    Thaks Paul ;
    I have sent the form and the data file - to the email yo listed.
    The form is signed, etc - and works normally - but i can' identify the issue for the subform instances -
    I gave it my best effort -
    Thanks for assisting .

  • How can I search the stage for a given Movieclip and then add all instances of it to an Array? AS3

    I would like to Add multible instances of one Movieclip, (Library Name = Bats | instance name = none), inside of another Movieclip (instance name = back.visuals) // (By HAND) NOT by addChild(mc_name); // Easy
    If anyone could help me out with code to do the next steps:
    Search the Movieclip, (instance name = back.visuals), that contains the Movieclips, (Library Name = Bats | instance name = none), manually added to the stage by hand.
    Then for all instances of this movieclip (Library Name = Bats | instance name = none) add them to an Array.
    Thank You,
    Dyami

    I think we are having some missed communication. I do not wish to Change Flash's IDE or deveolp new features for flash. I was wondering if there was a way to do my question with AS3. something along the lines of :
    var enemyList:Array = new Array;
    for (var index:int = 0;index < back.visuals.numChildren;index++)
        var wall:MovieClip = back.visuals.getChildAt(index) as MovieClip;
    /* Check to see if wall is of a Specfic MovieClip */
    /* if (Above is True){ enemyList.push(wall) };

  • AF:QUERY : JBO-25058 when we add duplicate instance of multi select enabled and search

    Hi Getting JBO-25058 error when we add duplicate instance of multi select enabled attribute from Add Fields and click on search Our requirement is to add validation if search panel has duplicate instance of multi select enabled attribute but this error comes before control goes to Managed bean. Kinldy help. Typical message: JBO-25058: Definition _sel__vci_lov_LOV_ForecastType_ActiveRevnForecastVC_vcrow2097_ForecastType_vcrow2097_ForecastType_itemHolder_vcrow1_ForecastType of type Attribute is not found in __LOCAL_VIEW_USAGE_sessiondef_ForecastAM_oracle_apps_sales_salesForecasting_forecasts_forecastService_applicationModule_ForecastAM_ForecastOverviewPageVO_vcrow2097_ForecastType_itemHolder_ForecastTypeLookupPVO_findByVC_8fc_LOV_ForecastType__lov__filterlist__vcr___.
    Regards
    Rajesha

    Sarah,
    I could reproduce the error.
    However, I created a drag-and-drop page fragment with quick search and table, and modified the adfc-config-EmpVw task flow to reference the drag and drop page:
    <view id="EmpVwTable">
    <page id="__120">/EmpvwDD.jsff</page>
    </view>
    And then I still get the same error, so this looks like an ADF bug to me.
    I also created a stand-alone jspx page using drag and drop, same error as well. I suggest you make a testcase without JHeadstart and contact Oracle Support.
    Steven Davelaar,
    JHeadstart Team.

  • 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

  • Add another instance to RAC database...

    Dear all,
    If u want to add another instance to database... using dbca ... database should be shutdown or running....?
    Please help.
    Regards,
    Imran

    Perhaps asking the question in the RAC forum might be more useful.
    http://forums.oracle.com/forums/category.jspa?categoryID=140
    But - if you think about it ... the idea of RAC is to maintain ultra high availability. It would sort of defeat the purpose to shut down all RAC nodes to add or remove one node from the database.
    (In other words the other nodes can, and probably be should be, up.)
    The proper steps to add a node, in general, are
    - Install and configure OS and hardware for new node.
    - Add Oracle Clusterware to the new node.
    - Configure ONS for the new node.
    - Add ASM home to the new node.
    - Add RAC home to the new node.
    - Add a listener to the new node.
    - Add a database instance to the new node.
    The details are in the Oracle® Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
    The real kicker is that the clusterware is installed correctly and it recognizes the other nodes. Also means that the shared store is properly configured, and that is a step people often mess up.
    Message was edited by:
    Hans Forbrich

  • Making Subform Instances Visible/Invisible

    Hello,
          I am trying to loop through the Subform Instances of the form and trying to make them visible/invisible on the click of a Check Box. The script seem to run just fine but the values nothing happens to the subforms. The script is written on the CLICK event of check box and is as below:-
    ----- HAP_DOCUMENT.APR.HAP_DOCUMENT.Positions.DATA.CHECK_BOX::click: - (JavaScript, both) ----------
    var
    nCount = APR.HAP_DOCUMENT.T_ELEMENTS.DATA.instanceManager.count;
    //var plan_value = this.parent.PLANS.rawValue;
    var
    plan_value = this.parent.parent.parent.Storage_Form.PLANS.rawValue;
    for (var nItem = 0; nItem < nCount; nItem++) { // Begin Loop T_ELEMENTS after the Instance is created
    var sub_Tele = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"]";
    var tName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA";
    var sCount = xfa.resolveNode(tName).instanceManager.count;
    for (var sItem = 0; sItem < sCount; sItem++) { // Second Loop on T_COLL_CELL
    var fName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA";
    var tCount = xfa.resolveNode(fName).instanceManager.count;
    for (aItem = 0; aItem < tCount; aItem++){ // Third Loop on T_FIELD
    var gName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"].simpleField.VALUE_STRING";
    var lName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"].simpleField.CAPTION";
    var subName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"]";
    var aVal = xfa.resolveNode(gName).rawValue;
    var bVal = xfa.resolveNode(lName).rawValue;
    var subVal = xfa.resolveNode(subName).presence;
    if (bVal == "Position Number"){
    if (aVal == plan_value) {
    if ( this.rawValue == 1) {xfa.resolveNode(subName).presence
    = "visible";}
    else {xfa.resolveNode(subName).presence
    = "hidden"; }
    Is there any other way of addressing the properties of the Subform Instances? Could any please help me as to why there is no effect on the subforms?
    Regards,
    Shishir.P

    Is the form saved as dynamic? Are you getting any errors in the javascript console?
    Paul

Maybe you are looking for

  • Query for Vendor Payment in SAP

    Hello All, I am a sap abap developer with little knowledge in SAP MM and SAP FI modules. As per some requirement of my company ,i have created a PO then its GR and finally IR. Now when i checked EKBE table (History per Purchasing Document) , i found

  • IBook G4 and Adobe software

    I am considering buying a 12" iBook G4. I want to use it with Adobe Photoshop, Adobe Design, and Adobe Illustrator (and professional resolution photograph files). I would like to know if a 12" iBook G4 would work well with these programs, or if I sho

  • When trying to restore my Iphone it goes into recovery mode

    I recent just upgraded my IPhone 4s to 5s.  When I synced it to my computer it transfered eveything from my old phone to the new one which I didn't want.  So when I tried to restore it to factory settings it went to recovery mode.  I can get it out o

  • Class to update infotype

    Hi friends, Can you please give the details of class(not HR_INFOTYPE_OPERATION) for updating infotypes? Thanks in advance, Anu

  • Is there a way to send pictures to another user on a Mac without putting them on a disc or memory card?

    Trying to find a easy way to move pictures to another user without having to export them to a disc or memory stick, then importing them to my my wife's username.