Add instance before existing instance

Hello all,
is there a way to add a new instance of a Subform to show in a top the existing subform? the way it works now when you add a click on button to add a subform, the new subform shows under the exisitng subform and so forth, every time I add a subform it goes to the bottom. I want the opposite to happen where new subforms, always show in the top of old subforms.

It depends on where you want the subform to actually go.
Suppose you have a button inside a subform and you always want the new subform to go on top of the entire stack of subforms:
this.parent.instanceManager.insertInstance(0);
If you want to add it right above whatever instance you're working on, then this code will work:
this.parent.instanceManager.insertInstance(this.parent.index);
Note: You'll need to add or remove reference points depending on what you're using to trigger the event, of course.

Similar Messages

  • Add instance on Read only field issue

    I have a subform with two fields , one a date field to capture current system date and time and another is a Text field for some comments.
    Then there are two buttons ,one for Adding the instance for these two fields and another is a Save button which makes these two fields
    The requirement is that once both the fields are filled with data and i click on save button, the fields should become read only ,however when i click on the add instance button the instance is added successfully but the save button click is not making the new instance read only.
    The Code for Add Instance Button is :
    "New1.FileNote.instanceManager.addInstance(true);
    xfa.form.recalculate(true);"
    The code for Save button to make the fields read only is :
    New1.FileNote.DateTimeField101.access = "readOnly";
    New1.FileNote.TextField37.access = "readOnly";
    Please guide me as I am totally blank on how to code the same..Have a rough logic of using a for loop with index of the Add Instance but not getting the way out for the code.
    Thanks a lot for any help and guidance.

    Hi Steve,
    Thanks for your reply..I made it happen using the for loop with Index and resolve node. However there is another issue which occured after that..I have a date/time field in that repeating subform instance.
    The run time property is set to Current Date/Time. Now the issue is whenever i click on save, form.recalculate instance changes the existing time value in the previous subbform instance as well
    Is there a way to retain the existing value in the field of the previous instance ??
    Regards
    Kapil

  • Adding add instance into calculation

    I am trying to get  fields  from  add instance/subform fields to calculate with the rest of the form fields. The problem I am having is once I "add instance" the field is no longer part of the calculation. I have tried using:// Verify at least one instance of the midtr3a field exists.
    if 
    (exists(location.yes900.admids.midtr3a) == 1) then
    Sum(location.yes900.admids[
    *].midtr3a)
    endif
    would appreciate any help on this.
    Thanks K

    I think you do not have to check for whether the field exists or not..Because when you use the "Sum" function, it will check if the field is present and if it has value or not.
    You may directly try the following int he script..
    Sum(location.yes900.admids[*].midtr3a
    Also in your Exists function, you are checking "exists(location.yes900.admids.midtr3a)".. This will only check for the first instance of the field.
    Thanks
    Srini

  • Can't Add instance code

    I am working on a flash file AS2 that contains some combo
    boxes.
    When I start the program I can right click on a button and
    add instance code ie current selection is the button.
    After working on the file for a while I can't do this.
    When I right click on new buttons and objects and select
    actions the current selection shows as the frame not the
    object I want to add code too.
    This is very frustrating as I basically can't add instance
    code.
    Any help would be greatly appreciated
    Alfred

    I think the problem was the pin current script button. Some
    how I clicked this and no matter what I right clicked on it would
    always take be to the last script I used before I hit the button.
    Thanks for your prompt response.
    Alfred

  • Add Instance variable

    1.
    Can we add instance variables to an existing standard agent
    e.g. can we edit the metadata file for an UNIX host (default agent installation which OEM provides) and add owr own variable ?
    2.
    How do we edit and add the values under "Target Properties" for each agent. Couldn't find a Save button...The following properties look empty and just wondering how do we add them ?
    Comment
    Line of Business
    Deployment Type
    Location
    Contact
    Thank you

    I dont understant what you say 'instance variables'
    Provide me what are your problem or what do you need
    Regards
    PD: The target properties of a host or database can edit with grid control console or if you edit the targets.xml file
    the agent properties also can edit if you modify the emd.properties

  • Calculation in an add instance

    I am trying to use an if statement in an addinstance of an interactive form.  Based on the results of one field in the addinstance, I want to sum a different field from the add instance.  So, the customer can add any number of rows and choose from a drop down (coded 1-4) the position of the person.  If that position is 1 or 2, I want to sum the salary field in a calculation box.  If the position is 3, then I want to sum the salary(ies) in a second calcuation box, and if the position is 4, then I want to sum the salaries in a third calculation field.  My code for one of the the calculation field looks like this:
    form1.#subform[8].#subform[9].details.total.conditions.#subform[0].numTotal[
    1]::calculate - (FormCalc, client)
    if (detail[*].PTFT < 3) then
          Sum(detail[*].salary)
          endif
    The other two fields are the same except that they change "<3" to "==3" or "==4". 
    The problem is that it does not sum the second or third calcuation field.  Only my first calcuation field will work. 
    Since it is a rather simple if statement, I think that the problem may be in the subforms, possibly?
    Please see my form at http://www.units.muohio.edu/lifelonglearning/forms/zzztest.pdf
    Thanks in advance for any help you can lend.

    Ok I had a look at your form (nice form by the way ...good job). The expression you are using to determine the number of instances is not correct....as well when you sum the salaries it is the details subform that has th eiccurance numbers so that needs the * notation. Here is the 1st calc modified
    if  (details._detail.count < 3) then
         Sum(detail[*
    ].salary) 
    endif
    You also have the same code on the layout ready and the calc event. No need for both ...just leave it on the calc event and when the user enters the amounts the totals will update.
    You are also getting an error when the row initialize .....a partNoScript is being called becuase of script behind the Name field (itis called txtPartNo in your form). My guess is that you copied this from the Purchase Order sample and forgot to remove the scritp from the Initialize and the change event. This field was originally a DD field and that is what was used to populate it.
    Hope that helps
    Paul

  • Add instance in a subform which also can be doubled

    Hi,
    I have a subform X which can be doubled by a click on the button. In that subform X there is another subform Y which also can be multiplied to a maximum of 3.
    Now when I add a subform X and i want to add some subforms Y. The form will only add the subform Y in the first subform X and not in the second one.
    This is the script I use:
    for subform x
    if(Incitant52.subFoireAcheteur.all.length < 2){;
    Incitant52.subFoireAcheteur.instanceManager.addInstance(true);
    and for subform y
    if(Incitant52.subFoireAcheteur.subAcheteur.all.length < 3){;
    Incitant52.subFoireAcheteur.subAcheteur.instanceManager.addInstance(true);

    To add instances to the second occurance of subform x you will need to address it with subformx[1].
    Note that the [ ] brackets are not valid in javascript so your expression should look something like this:
    xfa.resolveNode("Incitant52.subFoireAcheteur.subformx[1]").instanceManager.addInstance(1)

  • Add Instance Subform content to textbox

    Hi all,
    There is sth I would like to do.
    I have a form which has a text field that is in a subform where you can add instances. No problem with pages etc.
    Now, I have created a text field where I would like all entries to be repeated as plain text possibly separated by rows.
    For example:
    Textbox in Subform: Eggs
    Textbox 2 in Subform (after clicking the add instance button): Butter
    Text box at the end should either say:
    Eggs, Butter
    or
    Eggs
    Butter
    Does anyone have an idea on how I can achieve this?
    Thanks a lot,
    Larissa

    Hi Paul,
    Actually I have several requirements. I have attached the pdf as this seems easier at this point.
    At the beginning of the pdf, I have the marks in three boxes. I would like to concatenate them with a comma between the different entries into a text field that users can then copy paste into the next form.
    Let’s say in the first box you put:
    A
    B
    C
    In the second,
    D
    E
    I would like to have a text box that comes out as: A,B,C,D,E
    Second problem I am facing with this task is at the countries.
    I have a country online selection and a second country selection.
    Ideally I would like to have just one box with all countries and be able to tell the pdf that certain countries have the characteristic “Online”.
    Thus if the client clicks on “Add” I would have two list boxes: One for Online and one for Rest. Depending on what the characteristic of the country it would either go into the Online or the Other.
    Any ideas on my problematic.
    I was thinking working with numbers and maybe telling the system that if it is under 100, move to Box 1, if it is over 100, move to Box 2.
    Thanks for your help.
    Kind regards,
    Larissa

  • Need help with add instance

    I'm can't figure out how to add a new record with add instance, see below for basic code.  The second one works but I can't re-create it.  I'm guessing something basic that I am over looking.
    I also can't figure out how to attached my pdf's so you have to download from my website.
    Thanks,
    Jay
    http://www.atg.state.vt.us/assets/files/Adding%20a%20row%20-%20does%20not%20work.pdf (does not work - need help)
    http://www.atg.state.vt.us/assets/files/Adding%20a%20row%20-%20works.pdf (this one works - I didn't create it)

    It looks as if you have saved the form as an Acrobat 7 STATIC form....you
    need to save it as a DYNAMIC form.  You will find that option in the file
    types in the save as dialogue.  I resaved it locally and your form works.
    Hope this helps

  • Ciscoworks 4.0, netconfig job, add instance problem

    I'm trying to make an adhoc job to some devices in ciscoworks.  I select netconfig jobs, select the devices I want to do a change to, and then select add instance, I get a new browser window saying loading and nothing more happens.
    I cannot create the config lines I want to perform to my switches.  I just want to change the vtp domain name to the switches, but cannot do this due to the blank browser window saying loading.
    Anyone know anything about this?
    Br
    Geir

    I just updated my LMS 4.0 device packages, and I cannot reproduce.  I then noticed your SharedNetconfigIOS.zip package is larger than mine.  I suspect it's corrupt.  Go to Admin > System > Software Center > Device Update, check the boxes next to Common Services and Inventory Config And Image Management and download and install all available packages.  If none are available, you will need to contact TAC to get an up-to-date package repository to correct this problem.  You can click the "Open Service Request" link in the Actions panel of this thread to capture everything we've done here if you have to open a service request.

  • Add Instance

    In the first image below the user can click on "AC" to add additional lines for comments. When they have completed that they will click on "Add Line" to add a new instance of that line. In the 2nd image the 2nd line is overwritting the additional comments add to the 1st line. How do I position line two and additional lines to occur at the bottom of the additional comments (1 comment or 5+)
    Also I need two more buttons
         1. Will add line and copy the contents of the line above
    `    2. Move line - Up and Down button that will allow the user to reorder the entries.
    Thanks in advance for your help!

    Hi,
    The example has several tables, the last two have add, remove buttons, as well as move button and button to add rows directly underneath (add instance and move it in one click).
    There is an example I did here for someone. https://acrobat.com/#d=HD6XJ1qofZDf713Yq1P43g. From memory the add instance script also copied the rawValue of the "Send to" object to the "Reviewer" object in the new instance. This should give you a direction.
    When it comes to LiveCycle Designer there is no single source with all of the information. Some of the Adobe resources are extremely valuable, but do not make for light reading.
    A good book to start out with is JP Terry's book on LC Designer, which is excellent - "Creating Dynamic Forms with Adobe LiveCycle Designer".
    We have some solutions and blog posts on our website http://www.assuredynamics.com. We are trying to make some of examples more instructional. Also if you go to the blog on our site you will see some other blogs that we strongly recommend.
    There is also a range of online resources. You may find these resources helpful:
    http://www.adobe.com/go/learn_lc_scriptingBasics
    http://www.adobe.com/go/learn_lc_scriptingReference
    http://www.adobe.com/go/learn_lc_formCalc
    http://www.adobe.com/devnet/livecycle/articles/Adobe_XML_Form_Object_Model_Reference.pdf
    http://www.adobe.com/devnet/acrobat/pdfs/lc_migrating_acrobat_xmlform. pdf
    And a very handy resource (and while it is for version 6 it is still very good because of the way it is laid out):http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
    The help file also helps with syntax and LC Designer comes with templates/examples.
    Lastly, check out the Developer's Network on http://www.adobe.com/devnet/livecycle/
    Also a book that doesn't deal with scripting at all but is very good on form layout is "Forms that Work" by Caroline Jarrett and Gerry Gaffney.
    The Adobe "PDF Forms Bible" is okay, but mainly focuses on AcroForms.
    Windjack Solutions have a subscription based service for solutions and scripts at http://www.pdfscripting.com. It has a lot of AcroForm script that can be amended to suit LC Designer and a growing library of LC Designer solutions.
    Hope that helps,
    Niall

  • How do I add songs to existing playlists on the iPhone?

    I've tried going to the playlist, tapping the + button. Then I select the song by tapping it, it grays out as though selected. I tap done, and again done in the playlist. But the song is not appearing in the playlist. Am I missing something?

    How do I add songs to existing iTunes store playlist I have published?
    From iTunes Help...
    To change or delete a published playlist:
    Sign into the iTunes Store with your Apple ID, if you haven’t already.
    In the Playlists section of the iTunes Store, click All Playlists By This User.
    Select the playlist you want to change or delete, and then click Edit.
    Do any of the following:
    To change the playlist’s title and description, type any changes.
    To add a song, click Add Songs, select a song, and then click Add. When you’re finished adding songs, click Done.To find a song by album, artist, or song title use the Search field.To hear a 30-second preview of the song before adding it, double-click the song’s title or click the Preview button .
    To remove a song, click the “x” to the right of the Buy button for the song you want to remove.
    To arrange your playlist, drag songs in the order you want.
    To delete the playlist, click Delete this playlist.
    When you’re finished making changes, click Save.

  • How can i add an already existing iphone to a different itunes account without changing anything on the actual phone...just updating it?

    I have an iphone synced to my iTunes account.  But I need to add another used/existing iphone to my account to update it.  I do not want to sync my emails/contacts/apps, etc. from my computer/iTunes to this new iPhone.  This 2nd iPhone already has existing apps and is in use.
    Is there any way that I can do this without changing anything on the existing iPhone?  All I need to do is update it to the iOS 5.0.1. 
    Thanks!

    Thanks so much for the response!  You have been helpful and quick! 
    It wasn't my phone, hence the reason we didn't want to share/take each other's content (apps, contacts, music, photos, etc.).  But the owner's phone hadn't been able to update because of a computer crash/no access to a stable computer.  So, I just wasn't sure if we could do an update without sharing content. 
    But you most definitely answered my question!  So, thank you!

  • Is there a way to add to the existing values in a container when a LabVIEW prototype (cluster) changes?

    Is there a way to add to the existing values in a container when a LabVIEW prototype (cluster) changes?
    I have a cluster with 90 values..  ninety!  yes that many.
    Change one bloody value and the prototype changes in the TestStand step...  Reload the prototype and guess what happens??!!??
    All the bloody values get reset to defaults!  AAAAAAAAAAAAAARRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGHHHHHHHHHHHH!
    If it was in one place, I could survive the ordeal.  But I have to change bloody prototypes in many places!!!!
    more AAAAAAAAAAARRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!
    I can't even copy the bloody values!!!!!!!  AAAAAAAAAAAARRRRRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!
    Are there any tricks that I am not aware of, or have forgotten over the years, or...  ...   something??!!??!???!!
    If there are none, I will have to post an improvement to TestStand..  I should mention I am using an older version (4.1).

    Hmmmmmmmmmmmmmmmm,
    I am not not very famous with LV and its cluster types.
    So no idea if this works (it works for DataTypes updates very well and a LV cluster is Data Type so.... maybe)
    Make a copy of the step that has to be modified to an new sequencefile. 
    Make modifications the in the copy.
    Now you should have the same DataType Name but other contents in the container. Save it.
    Normally there should be a message box that tells you that version has been incremented. - Accept it.
    Set in StationOptions-File "Allow Automatic ...." to Never.
    Open original sequencefile. Now the there must be a type conflict. Accept/Apply to all  "Use Current Loaded.."
    You have updated the type.....
    Hope this worked,
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • I have a g4 running os10.4.11, i bought a epson workforce 1100 and tried to set it up but there is not a listing for it when i try to add it before installing the driver software from the supplied cd...anyone know what i can do to get it set up?

    i have a g4 running os10.4.11, i bought a epson workforce 1100 and tried to set it up but there is not a listing for it when i try to add it before installing the driver software from the supplied cd...anyone know what i can do to get it set up?

    Load the drivers and you should then be able to add it in Print Center.

  • How to add namespaces before a tag name in XML??

    Dear friends:
    I have following code, and hope to add namespaces before the tagname such as Company, Location and even any attributes in this xml,
    Can you help throw some lights??
    Thanks in advance.
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Attr;
    import org.w3c.dom.Document;
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    import org.w3c.dom.Element;
    public class DocWriteDOMStart {
        public static void main(String[] av) throws IOException {
            DocWriteDOMStart dw = new DocWriteDOMStart();
            Document doc = dw.makeDoc();
            ((org.apache.crimson.tree.XmlDocument)doc).write(System.out);
        /** Generate the XML document */
        protected Document makeDoc() {
            try {
                DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
                DocumentBuilder parser = fact.newDocumentBuilder();
                Document doc = parser.newDocument();
                Element root = doc.createElement("Company");;
                doc.appendChild(root);
                Element loc = doc.createElement("Location");
                root.appendChild(loc);
                Element emp = doc.createElement("Employee");
                loc.appendChild(emp);
                emp.appendChild(doc.createTextNode("Daniel Bush"));
                Element emp2 = doc.createElement("Employee");
                loc.appendChild(emp2);
                emp2.appendChild(doc.createTextNode("Sandy Moore"));  
                Element dept = doc.createElement("Department");
                Element e = (Element)dept;
                e.setAttribute("Nationality", "USA");
                e.setAttributeNS("www.yahoo.com", "dept", "http://www.google.com");
                //e.setAttributeNodeNS(newAttr);
                loc.appendChild(e);
                e.appendChild(doc.createTextNode("IT Depart"));
                return doc;
            } catch (Exception ex) {
                System.err.println(ex.getClass());
                System.err.println(ex.getMessage());
                return null;
    }and I got
    <?xml version="1.0" encoding="UTF-8"?>
    <Company>
      <Location>
        <Employee>Daniel Bush</Employee>
        <Employee>Sandy Moore</Employee>
        <Department Nationality="USA" dept="http://www.google.com">IT Depart</Department>
      </Location>
    </Company>hope to add namespaces before the tagname such as Company, Location and even any attributes such as dept, nationality etc in this xml,
    I try but fail.

    You would have to write code that does that, then. Right now your code writes that part of your XML as elements that aren't in a namespace. I can tell you know there are different methods to write elements that are in a namespace because you used a different method to try to write an attribute that is in a namespace.

Maybe you are looking for

  • Help Please! Timeline Question with Invisible Buttons

    I am new to FLASH and have created a rotating banner for our website with 5 roatating images with 5 invisble buttons linking to 5 landing pages. And  it works the first loop through.  However when it gets to action 5 for my last image, that link cont

  • Depriciation error.

    Hi, one asset Document has been posted after Actual date, 12 days after the capitalization of asset say asset supposed to  capitalized on 4.11.2008 but document has been posted on 16 th of the month, so first i need to change asset calculation and ca

  • Exception Handling Strategy in EJB enviroment

    Hi, Im hoping someone has a good solution for this problem... I have an EJB that uses some utility classes. We always throw exceptions from the utility classes and handle them in the session bean by logging the exception. Now my problem is that there

  • Activate input for a field depending on the input in another field

    Hy gurus, A have a report with select option. In the select option I'd like to have the following: I have a checkbox ,if it is flagged the input for another field should be made possible. The problem is,to activate it right after I flag the checkbox

  • Is there some kind of program that prevents your computer from playing soun

    Sometimes YouTube videos can be too loud, or even too small, so I want to have the volume automatically adjusted to certain decibels, so that I don't have to constantly adjust the volume levels and listen to all things at the same level.