Copy to new instance of subform

What I am looking to do is to copy a field and when a new instance of a subform is created past it to another field.
When a user clicks the transmit button, the transmit button opens a new instance of the form.  I need the Sent To field to populate the Reviewer field on the new instance.  Is this a possibility?

Hi,
This should add an new item to the reviewer dropdown and set its rawValue:
// script to add instance of subform
// count the number of instances zero based numbering
var lastRow = _mySubform.count - 1;
var 2ndLastRow = lastRow - 1;
var oItem = xfa.resolveNode("mySubform[" + 2ndLastRow + "]").sentTo.rawValue;
// add the item to the dropdown
xfa.resolveNode("mySubform[" + lastRow + "]").reviewer.addItem(oItem);
// set the rawValue
xfa.resolveNode("mySubform[" + lastRow + "]").reviewer.rawValue = oItem; 
However this won't check for duplicates. Steve has a good script for this: Drop-down list automatic add-on
Good luck,
Niall
Assure Dynamics

Similar Messages

  • 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

  • Unable to position instance of subform

    I am able to add a new instance of subform during runtime but it's not positioned properly meaning as it grows it add the form on another subform.
    Any idea how to fix this problem?

    Hello, can I see your code? I have a similar question and would like to compare my script with yours. Are you using JavaScript?
    Regards
    Harold

  • Checking for a value in a field within a subform before allowing a user to add a new Instance

    Form setup:
    Page name = Page1
    1st Subform within Page1 = Info (set to flowed)
    Objects within Info subform: Name (textfield) and Email (textfield)
    I also have a 2nd subform within Page 1 which contains an add instance button
    What I'm trying to do:
    1. The user needs to enter their Name and Email address then click "Add Instance button" to create a new instance of the Info subform :  _Info.addInstance(1);
    2. If the user fails to enter an email address, I want there to be a mesage box that infos the user that an email address is required before he/she can create a new instance. Note: It would also be nice if the cursor is Set to foucs on the email field within that particular subform instance.
    3. As long as the user tries to continue adding an instance, he/she will be denied if they do not enter an email in that instance
    4. If the user includes an email address in that instance, then the script will create add a new isntance
    5. The process should continue in this manner for each each click of the add instance button
    I presume there nees to be a loop and perhaps a somExpression scipt, but I'm not sure.
    Here's what i have so far (see below)....The script works for the first instance on the page, but it doesn't prevent new instances from being created when the email field in that "current instance" is empty. I want it to prevent the user from adding new instances if the email field is balnk in that "current instance". So, I guess I'm not sure how ot test a field in the current instance in a repeating subform.
    var vName = Info.somExpression + ".email";
        var vEmail = xfa.resolveNode(vName).rawValue;
        if(vEmail == null)
    xfa.host.messageBox("PLease enter an email address.");
    else{
    Form._Info.addInstance(1);
            var i = Form._Info.count - 1;
            xfa.host.setFocus(xfa.resolveNode("Info[" + i + "].Name")); //This set's the focus of the cursor in the Name field of the newly created subform
    Please advise, and thank you in advance!!!!!!

    Hi,
    I think you can acheive what you want just by adding "lastRow.presence = "hidden";" when you do the addInstance, so it now looks like;
    var lastRow = Form.resolveNode("Info["+(_Info.count - 1)+"]"); // Get last row
    if (lastRow.Email.isNull) // If email field empty
        xfa.host.messageBox("Please enter an email address.");
    else
        lastRow.presence = "hidden";
            var newRow = _Info.addInstance();
        xfa.host.setFocus(newRow.Name.somExpression); // set focus to Name field on the row just added
    So whenever you add a row the previous one is hidden?
    For your second issue, if you could have another button on your form, you could ask the user for a password and if they enter it correctly then show for the Info subforms, so;
    var response = app.response({ cQuestion: "Do you want to see all respones?",
                                  cTitle: "Unlock Form",
                                  bPassword: true,
                                  cLabel: "Please enter the password:" });
    if (response === "Password")
        var infoSubforms = Form.resolveNodes("Info[*]");
        for (var i = 0; i < infoSubforms.length; i++)
                    var infoSubform = infoSubforms.item(i);
            infoSubform.presence = "visible";
    You would want to password protect your template as well (in Form ... Form Properties ... PDF Security) so people couldn't just open the form and look at the password.
    Probably the simplest approach.
    Hope this helps
    Bruce

  • How to reorder / move new pages and subform instances

    I have a form that has 2 functions - show a hidden page and duplicate the Page 1 and I need to reorder the pages once the user has added an instance or shown a page. I have Form A (Page 1) that can be duplicated but the user can add in a Form C (extra page) to be attached at the end of that instance of Form A.  So it goes like this:
    Form A (Page 1)
    button 1 - Adds new page 2 "Form C" to end of that "Form A"
    if (CompleteFormC.rawValue == 1) then
       topmostSubform.FormC2.presence = "visible"
       xfa.host.pageDown();
    else
       topmostSubform.FormC2.presence = "hidden"
    endif
    button 2: Adds a new instance of "Form A"
    topmostSubform.FormA.instanceManager.addInstance(1);
    xfa.host.pageUp();
    Currently, it adds the Form C to the very end, like so:
    Form A
    Form A
    Form A
    Form C
    Form C
    Form C
    I am trying to reorder the pages so the user can add in a Form C to every instance of Form A, like so:
    Form A
    Form C
    Form A
    Form C
    Form A
    Form C
    It's a little complicated but I would appreciate any help at all!

    Ahh, thank you. I just moved Form C into Form A subform group, it works and stays attached to that instance of Form A. Here's another issue... now that I have Form C appended to Form A, when I add in another Form A it correctly gets added after the last Form C but how can I get the form focus to go to the top of that new instance of Form A?
    Currently I am using: xfa.host.pageDown()
    But now it would be skipping down a few pages. Is there a way to also move to the top of that new instance?
    Thanks!

  • ORA - 01034 : ORACLE NOT AVAILABLE  Error while creating new instance.

    I was trying to create new instance in unix environment. I have configured all my shell scripts to run and install but while performing the install I get the
    following error message and fails.
    ORA-01034: ORACLE not available
    I have previously installed an instance using same scripts but fails this time when I copy the scripts and modify them in new folder. Pointed out the path in the scripts correctly.
    I am a junior DBA and I would appriciate your help.

    Paste here scripts, your .profile (or environment variables according to Oracle) and your init.ora

  • Problems when creating a new instance of an Input parameter for a REM

    I am working in a small demo which calls a Remote Enable Function Module in order to read data from the back end system. Since the function module I need to call ("BP_BUPA_SEARCH_BY_USER") is not Remote Enable I created a copy of it and made it Remote Enable ("Z_BUPA_SEARCH_BY_USER"). I have created the model within webdynpro without any problems but when my application reaches the line where I create a new instance of the object Z_Bupa_Search_By_User_Input (see below the source code), just before to call the remote function, the application stops there. I have exactly the same code in another bapi calls and it works fine. I am wondering if my problem has anything to do with the fact the function module i am calling is the function module I created. Any advice is very welcome.
    Regards,
    Diego.
    Source Code:
    msg.reportSuccess("------>>>");  "THIS LINE IS PRINTED
    Z_Bupa_Search_By_User_Input searchByUser =
    new Z_Bupa_Search_By_User_Input();  "PROGRAM STOPS HERE          
    msg.reportSuccess("<<<------");  "THIS LINE DOES NOT                
    wdContext.nodeZ_Bupa_Search_By_User_Input().bind(searchByUser);
    msg.reportSuccess("<----
    msg.reportSuccess("if (Internet_User != null)");
    if (Internet_User != null) {
    Usselmodbe ir_user = new Usselmodbe();
    ir_user.setSign("I");
    ir_user.setOption("EQ");
    ir_user.setLow(Internet_User);
    searchByUser.addIr_User(ir_user);

    Hi,
    Try to get some more error info, e.g. like this:
    try {
    Z_Bupa_Search_By_User_Input searchByUser =
    new Z_Bupa_Search_By_User_Input(); "PROGRAM STOPS HERE
    } catch (Exception e) {
        msg.raiseException(e.getMessage(), true);
    msg.reportSuccess("<<<------"); "THIS LINE DOES NOT
    good luck,
    Roelof

  • PS2013 - When creating a new instance of Project Server hangs in 'Waiting for resources' status

    Hi,
    I have one instance of Project Server 2013 fully operational and I tried to duplicate the instance to make some tests. As I know the issue of using the same Content Database of Project Server in the same Server Farm, I used the powershell  backup/restore/dismount
    and mount the content database to change the site IDs to avoid index duplication. The Project server database was a regular SQL backup and restore in another database.
    I created a new Web App in the port 90 as show below.
    Then I included the Content database of Project Server as separated DB from SharePoint for this new SharePoint -acme90 and I tried to create the new instance. The creation hanged in "Waiting for Resources" status.
    To make another check excluding the reuse of the SharePoint-80 I tried to create another instance both in the SharePoint-80 where is the working instance and in the SharePoint-90, everything default and again they all hanged in Waiting for Resource.
    If I try to create the instance using PowerShell I got the following error:
    PS C:\Users\epm_setup> Mount-SPProjectWebInstance -DatabaseName Test_EPM -SiteCo
    llection http://acme02/epm -Lcid 1046
    Mount-SPProjectWebInstance : Cannot find an SPSite object with Id or Url:
    http://acme02/epm.
    At line:1 char:1
    + Mount-SPProjectWebInstance -DatabaseName Test_EPM -SiteCollection
    http://acme02/ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
        + CategoryInfo          : InvalidData: (Microsoft.Offic...ountPwaInstance:
       PSCmdletMountPwaInstance) [Mount-SPProjectWebInstance], SPCmdletPipeBindEx
      ception
        + FullyQualifiedErrorId : Microsoft.Office.Project.Server.Cmdlet.PSCmdletM
       ountPwaInstance
    All SharePoint and Project Server services are running, all App Pools and sites are started at the IIS. I could not find a hanging timer job.
    I cannot stop the hanged process or dismount the instances using Powershell since no instance created.
    How should I solve the hanging status of creation of the instance? As they are in Hyper-V I can go back using one snapshot.
    Thank you.
    Best regards, Ricardo Segawa - Segawas Projetos / Microsoft Partner

    Hi Eric,
    Thank your for your interest in this case.
    I checked for running and crashed PWA jobs and deleted all of them just after restoring the snapshot and tried to create the new instance in the new web app in port 90 (besides the existing and working instance in port 80), but again it hanged in "waiting
    for resources". There is not any timer job hanging, no error in event viewer or in log. So the error is well before working with cloned dbs.
    Answering your questiion, I am working all on 2013. My intention is backup one instance of the port 80 and copy to the instance of port 90, changing of course the url and the index of the content db of SharePoint. The process I used was:
    Create a new web app in port 90, creating a new SharePoint_Content_2 on a
    http://server:90 site.
    Created the top level site called Portal using the Team Site template.
    Create a new content db for new instance of Project Server named EPM_Content_2 using Central Admin.
    Backup content db from port 80 instance of Project Server and restore to this EPM_content_2 using PowerShell cmd.
    Dismounted and mounted this Project Server content db to create new index for existing sites to avoid index conflicts.
    Backup the Project Server DB from port 80 using SQL backup and restored as ProjectWebApp2 db for port 90 instance.
    Tried to create a new instance of Project Server
    http://server:90/pwa on web app of port 90 using the ProjectWebApp2 db and using the same app pool of the other instance. But as in the previous case, it hang out in "Waiting for resources".
    Best regards, Ricardo Segawa - Segawas Projetos / Microsoft Partner

  • Setting focus to new instance of a field...need help.

    Hi there,
    I have a flowed form which consists of multiple subforms. I have one subform which is basically one textfield that is set to a min of 1 and a max of 5.
    These are to correspond to fields in our system of record that have 5 fields for company long name with a 36 character field limit.
    I've got the limits set up just fine and I have added simple script to add a new instance when the user exits the field.
    The focus goes to the next field set in the tab order but what I want is the focus set on the new instance of field created but I have not been able to find an example of how to do that.
    Any suggestions would be greatly appreciated. Thanks!

    Well,
    I've been reading and trying various things but cant get anything to work like I want it to.
    The sample provided works for 2 iterations but mine has to do this for up to 5 instances. I have not been able to figure out how to get this to work.
    Anyone have any additional suggestions?
    btw...here is my modified version. ES2 is whay I'm using.
    Long_Title.occur.max = "5";
    var oSubform = xfa.resolveNode("Long_Title");
    var oNewInstance = oSubform.instanceManager.addInstance(1); // I think you probably managed this first part better than here
    xfa.form.recalculate(1); // I THINK THIS IS IMPORTANT
    var count = (this.Long_Title.nodes.length)
    var testIndex = oNewInstance.Account_Long_Title.index;
    xfa.host.messageBox("Text Field Index in new Subform: " + count); // TextField1 will conserve index 0 because it is the only textfield in the new Sub1
    var NEW_TEXTFIELD = xfa.resolveNode("Long_Title[1].Account_Long_Title[0]"); // However, Sub1 gets index 1 because it is not alone any more
    xfa.host.setFocus(NEW_TEXTFIELD); // This actually sets focus on the newly created instance of TextField1 (actually Sub1 instance)

  • Can't create new instance

    I have database server 9i R2 on Windows 2000 (and an application server 9i R2, too). I tried to create another database instance through the Database Configuration assistant, but it doesn't start!! (the hourglass appears for half a second and then goes away).
    What could be wrong?
    Is there a SQL script I can manually run to create my instance?
    Thanx

    you should find buildall.sql and build_db.sql under
    %ORACLE_HOME%/RDBMS/ADMIN. I think these might be what the gui tool uses to generate its own scripts. Either way, you can edit a copy of those to build an instance. Make sure you create the directories specified before you run them. Also, have an init<ORACLE_SID>.ora in the dbs directory that matches up to your new instance and create the service first using ORADIM (or similar, I'm doing this from memory)
    Your going to have fun, I can tell.

  • Exception when instatniating a new instance

    java.lang.Integer
    java.lang.ClassCastException: java.lang.Integer
         at fuego.server.persistence.jdbc.JdbcProcessInstancePersMgr.checkMaxAllowedSize(JdbcProcessInstancePersMgr.java:2711)
         at fuego.server.persistence.jdbc.JdbcProcessInstancePersMgr.executeUpdateInstance(JdbcProcessInstancePersMgr.java:3048)
         at fuego.server.persistence.jdbc.JdbcProcessInstancePersMgr.updateInstance(JdbcProcessInstancePersMgr.java:2359)
         at fuego.server.persistence.Persistence.updateProcessInstance(Persistence.java:1032)
         at fuego.server.execution.EngineExecutionContext.persistInstances(EngineExecutionContext.java:1984)
         at fuego.server.execution.EngineExecutionContext.persist(EngineExecutionContext.java:1203)
         at fuego.transaction.TransactionAction.beforeCompletion(TransactionAction.java:132)
         at fuego.connector.ConnectorTransaction.beforeCompletion(ConnectorTransaction.java:692)
         at fuego.connector.ConnectorTransaction.commit(ConnectorTransaction.java:375)
         at fuego.transaction.TransactionAction.commit(TransactionAction.java:302)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:481)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62)
         at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
         at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:251)
         at fuego.server.execution.ToDoItem.run(ToDoItem.java:536)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:775)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:446)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
    dear all i'm using the latest oracle BPM 10G studio and i get this excpetion whenever i try to create a new instance fo my process
    i increased the max size for instance in engine pref but no use
    any idea what meight be casuing this error
    another thing please i clecked the check box in the Start Engine dialog box so that it wont apear again is there any way to get this dialog box showing again ??? because i need to delete the old instances may be this causing this problema

    I had a similar problem and tried changing the max size of variables. But, as you said, it was of no use.
    I later found that my .project.xpld was corrupted due to a merge conflict. Using the older version of this file, solved my issue.
    I would suggest you to see if you had changes in project.xpld that may be causing it. Try moving to the working copy and do them again.

  • SetModal on JDialog is reflecting on new instance of API.

    In java application we have facilitated user to open a "New Instance". While working with copy i.e. on new instance if user has been opened a dialog box onto we have set Modal "True" then on another instance of application, user would not perform any thing until that dialog get disposed.

    A.Pancholi wrote:
    Thank you very much for your good response. I would like to know:-
    a modal dialog should only block it's own parent:
    In my case while opening "New Instance" of Application, the new instance and its copy, is not sharing anything. Thus they are like separate application. So Is their any bug in by code that's not allowing to work on copy of Application, if Dialog of new instance is being opened, which has setModel(True).So you are running the same Application twice and expect a Dialog from the second application to know about the parent Window in the first application? That's not a bug, that's you misunderstanding how things work.
    Since your goals are still unclear (and therefore impossible to help), you should provide an [SSCCE |http://sscce.org] that shows us exactly what you're talking about.

  • How to create copy or test instance of existing weblogic application?

    How can I create a copy or test instance of an existing weblogic 8.1 application? Is there a white paper that outlines the process?

    Hi All,
    I need some help in recreating new database instance.
    Here are the steps I have done so far:
    1. Created a database with name 'LASTDB' using DBCA
    2. Connected to RMAN.
    3. RMAN>SET DBID=******; (of the source database)
    4. Connect to target. RMAN>connect target SYS/*****;
    5. Executed controlfile restore on RMAN.
         RMAN>Run{
    Allocate channel D1 Type DISK;
              Set controlfile autobackup format for device type DISK to
    ‘\\<ip_address>\Backup\Prod\%F’;
    Restore controlfile from autobackup;
    6. RMAN> ALTER DATABASE MOUNT;
    Now got an error saying ORA-01103: database name ‘PRODDB' in control file is not ‘LASTDB’
    I tried using NID to change the database name but it's throwing an error that database is not mounted.
    I have browsed a lot and found that I need to recreate a control file of the production database using ALTER DATABASE BACKUP CONTROLFILE TO TRACE and should edit the trace file. But it also says to shutdown the source database which is production database and I cannot try that.
    Also I have tried adding a line to init.ora like lock_space_name = LASTDB. Also tried replacing everything from LASTDB to PRODDB but that didn't work either.
    I have been trying to find a solution to this. Please bear with me as I'm a beginner and please let me know how I can fix the error.
    I am running oracle 10.1.0.2.0 enterprise edition on windows 2000.
    Thanks for your patience,
    KG

  • 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

  • New instance impact

    Hi friends!
    We have SAP ECC for several countries. Recently, the company create "new instance" (copy of the original) in the same server, separeted by region.
    Now they are thinking about "create a new instance" in BI.  (is this a good idea?)
    Which will be the impact of this?  What changes will be needed in BI? 
    and portal? does I need create a new instance too?
    Thanks a lot for your expert opinion!

    just configure SMLG to include this new apps in logon balancing.
    if users have entries pointing to your CI in their SAPLOGON, you will need to adapt saplogon.ini and sapmsg.ini on very workstation to use logon balancing.

Maybe you are looking for

  • INCREMENTAL MERGE BACKUP & RECOVERY

    INCREMENTAL MERGE BACKUP & RECOVERY ===================================== 1) 개요 RMAN을 이용하여 database의 Image copy를 Backup하고 그 Backup에 retention policy만큼의 Incremental Backup을 적용하여서 복구의 시간을 단축한 Backup의 방법입니다. 즉 retention policy에 설정되어있는 시간 전의 최후의 시간까지 Ima

  • MDT 2012- Unattend.xml, or worse, No existing catalog file found.

    Hello. Back again with a new issue. MDT2012. Win 7 pro/ x64..  I've got a an issue with a recently Sysprep/Captured image. It was successfully captured with no errors, but won't deploy... citing I initially had an issue with an Unattend.xml (the drea

  • Which port number should be entered to create an icloud email account?

    Which port number should be entered to create an icloud email account?

  • Linking two lists to create a Data Source but cannot add web part to page in SharePoint designer

    All; I created a new data source by linking two lists which created a linked Data Source. I now want to access that linked data source via insertion of a Data Source control on a web part page. What I find is, both DATA SOURCE and DATA VIEW are inact

  • 10.4.9 ~ No iPhoto !!

    It was a major surprise and bummer to find out that my newly installed OS X 10.4.9 does not include iPhoto like my previous OS X 10.3.9 did. It's ridiculous that I must purchase iLife to get iPhoto. I will use no other application from the iLife bund