Add new data to instance and copy

Customer requested due to:

Each press of button creates a new instance of the subform (just 10 text fields), not the table.

They want another button, which will create a new instance of the subform and copy the data from the beginning, whenever they click the button.
Someone has a code in JavaScript to share?

Hello

You could probably do this as a loop through the objects in the subform, but as he is only 10 years old, you could script each in turn:

// Add the instance
page1._Subform.addInstance(true); 

// Duplicate from first instance
var nCount = page1._Subform.count - 1;
var oFirst = xfa.resolveNode("page1.Subform[0]");
var oLast = xfa.resolveNode("page1.Subform[" + nCount + "]"); 

oLast.TextField1.rawValue = oFirst.TextField1.rawValue;
oLast.TextField2.rawValue = oFirst.TextField2.rawValue;
oLast.TextField3.rawValue = oFirst.TextField3.rawValue;

Something like this should work,

Niall

Tags: Adobe LiveCycle

Similar Questions

  • How to add new data and delete old data from a custom text file?

    Hi guys!

    Well, I'm in a bit of trouble.

    I need to make a request to some GPS tools. Split data in indicators, generate coordinates (google maps format), and so it goes.

    One of the functions of the systems is the calculation of oscillation of coordinates. The formula should be: latitude 1 - latitude 2 = latitude AND longitude 1 - 2 = swing longitude longitude oscillation.

    Since I'm on two values, I thought: "Oh, if I connect these data in a file, I just pick up and do all the calculations part." Yes, this idea is adapted to my needs (even if it is not the best, the computer part solved my problem).

    BUT I don't see a way to write the current value of the loop and erase the old results.

    For example, suppose that loop 1 gave me 1.00000, 2,00000 coordinates and loop 2 gave me the coordinates 3.00000 and 4.00000. Right?

    My log file is similar to: 1.00000,2.00000; 3.00000,4.00000;

    Well, it works. However, we will look forward to loop 3: coordinates 5.00000,6.00000.

    If the program connects to it, I would get the chain: 1.00000,2.00000; 5.00000,6.00000; When I really need 3.00000,4.00000; 5.00000,6.00000;.

    For this reason, when I apply the calculation of oscillation, it will always take the most recent value and do all the calculations with the first result (from loop 1).

    Well, I wonder that there is a way to add new data to a file and replace the old values, with simple code. If anyone knows how, please respond here!

    Considerations:

    (1) I want to do it as simple as possible. My code is kind of great, and it is not appropriate to insert structures or library now.

    (2) maybe the explanation is not as simple as it is for me. Really, I couldn't find a better way to say what I need.

    (3) if someone has doubts as to my doubts, please just comment and I'll try to be as specific as possible.

    Thanks in advance!

    I guess my question is why write a file just to delete.

    If you pass an array of points from one iteration to another, you will have to take extra time to open the file, read the file, delete the old data, writing the new data, save the file, and then close the file.  It would be pretty much the same thing, but without having to go through the hard drive.

    Just a thought.

  • Add new data to the table in a log file

    Hi all. I am new to Oracle and I need to also write new data table in a logfile on Linux in order to live in the display screen. My first thought was to write a trigger, and after some research on googled around, I finally came to this:

    create or replace trigger foo_insert
    After Insert on foo
    for each line
    declare
    f utl_file.file_type;
    s VARCHAR2 (255);
    Start
    s: =: new.udate | '-' || : new.time | ' ' || : new.foo | ' ' || : new.bar | ' ' || : new.xyzzy | ' ' || : new.frobozz | ' ' || : new.quux | ' ' || : new.wombat;
    f: = utl_file.fopen ('BLAH_BLAH', 'current.log', ' a');
    UTL_FILE.put_line (f, s);
    UTL_FILE.fclose (f);
    end foo_insert;

    It seems properly to add new data in the log file as new inserts occur, but open and close the file each time are of course not optimal.
    In the app real new lines could have inserted every second or two. How can I optimize it? In addition, the log file will be archived and turned every day, so there must be a way to effectively report the relaxation of the oracle to reopen the case.


    Thank you!

    >
    I would like to pursue the optimization of the trigger
    >
    As Ed suggested you need to think this through a few others and refine the requirements.

    You said "I am new to Oracle. So you may not realize that anything a trigger didn't REALLY EVEN HAPPEN! The transaction can still be restored by Oracle or by the appellant. Want that all the 'hiccups' look too? If this isn't the case, then you can not use a trigger to do this. You need the process that translates the trigger being called to do logging after the data is stored.

    It should be noted that this requirement is before we can offer solutions to a problem.

    Assuming you want the trigger record all attempts change the data, then the best way I know to do that is to minimize the work does the trigger.
    Another fundamental principle is to follow the advice of the Ed and have a clear separation and distinction between "what" should be done and 'how' to do it.

    To minimize the trigger work change proposed Nicosa approach. Create an AUTONOMOUS_TRANSACTION stored procedure that handles the 'how' and just have the trigger to transfer data to the stored procedure values. The trigger provides data; He doesn't know, or care, what is done with the data.

    The stored procedure is then free to use the files, a table, write to a file or any other method is proving to be the best. You can change the methods without affecting the trigger.

    A queue or table may contain data, but again once you need to think about the obligation. Do you need fair access to data only once? Now, you want a "tail". But what happens if this requirement change tomorrow? You won't have to redesign the architecture.

    With a queue once you delete the queue data it won't here later if you want to get it again. With a table you can take as long as you want.

    I would like to start by using a table to store the data. If you use a sequence number or "insert_date" value, you can always query the data of interest. The table just collects data. He does not care how to use data.

    So, by using proven design principles and knowing that the requirements are for the most part unknown and may change unexpectedly, I would be:

    1. create an AUTONOMOUS_TRANSACTION stored procedure that accepts the parameter data and the thicket in a simple logging table.
    2. change your trigger to call the procedure to step #1
    3. create another procedure that performs a query of 'tail' for you will depend on 'insert_date' number or sequence. This query can write data to a file or return a cursor ref that your script can use to provide data for display.

    The approach described above takes each step in the process relatively independent of the other stages.

    Until put you the finishing touches to the requirements that you do not want to lock up your initial design.

  • How to add new fields of contacts and accounts?

    How to add new fields of contacts and accounts?

    You can use 'Fields' and 'View '.

  • Add new data warehouses to LM - Bug?

    I am trying to add a new data store to my new brand LM, for I am in 'Resources' - & gt; "Hosts" - & gt; Click home or right click on property - & gt;

    Under "available for this host data warehouses: ' I can see my two new LUNS which I attach to the availble early host and no tick on the front, then Iticked them and click OK.

    Then I went to the tap data store, still don't see no new one here.

    I missed any thing or it is a bug?

    Org are you?  If I remember correctly, you must make the data store available as a resource to the org.

  • Add new email tool bar and the address button no longer appears.

    Adding email addresses and for some reason, the toolbar address and add a new address button disappeared. Without them I can't add all email addresses more.

    Press F10 to display the menu.

    Menu view > toolbar > address book toolbar

  • [Beginner] LabVIEW 2010: Vi 'Writing on a text file' overwrite an existing file rather than add new data

    Hello

    I want to write data to a text file. Don't ask me why, I have to use the vi 'Write in the text file' and not 'write in a measurement file. Everyone do in my office.

    The point is that when I use the vi, the file is always overwritten, if I want to add data in the same file. See attachment for a view of my program. Obviouly, I'm trying to find an option in the property, but no... I sent the vi outside the lopp, but it does not work

    Oddly, it works very well with Labview 2009 but not Labview 2010

    Someone has an idea?

    Thank you for all

    See exhibit attached - open the file, move it to the end, write the text, close the file.

    You can also write at the beginning of the file, or to jobs in the middle.

    Ian

  • Add new data to the NAS or USB store

    Hi guys

    My ESXi 3.5 U4 on space is insufficient and we can afford new hard disks at the moment... we have a NAS with XFS file system, it also includes a USB port for external drives that we want to make our shop seconadry for virtual machines.

    I tried to add a NAS share on the Infrastructure Client using NFS, but it keeps failing, see "fails.jpg". Is this because its not formatted with NFS filesystem? If so, how do I format a disk in a format compatible NFS or NFS?

    Please notify

    Thank you very much

    Buffalo does not support NFS. Missing services. A lot of the small devics NAS used to support the NFS. Iomega storecenter peripheral support NFS, are in the HCL and pretty good markets. I have one for the storage of ISO and a virtual machine. Works very well and I think it was $100.

  • How can I add URL to my instances and components in flash?

    I'm building a website in flash and I am totally new to action script, script from Internet loan. I searched for days how can I link my Flash pages to each other, but I can't find anything (for action script 3), what Code to use? Also, I'm looking for how can I add links to pictures in my title component List to other pages that I created.

    I've included the Script I made for my component list title.
    How can I insert URL or links in this code for each item?

    Have you checked in the help:

    Help

    You might not be able to do as you do.
    Look in your code :--> source: "Items/Item1.png"

    How about if you create video clips that have images inside of them and the ActionScript for the video clips that will make certain actions... like go to a link...
    So that when you click on the image movieclip you can navigate to the URL... Keep in mind that navigateToURL() function does not work in the Flash IDE environment... you must put in the real site to test.

  • adding new data in the table property variant

    Hello guy,

    I have a Qml property

    property variant placeName:[]
    

    I would now like to add data in this property at run time.

    I checked this link:

    http://Qt-project.org/doc/Qt-4.8/QML-Variant.html

    but there, I found that we can "Update" the property data.

    What to add new data?

    Please help me as soon as possible...

    property real estate to qml aren't real javascript arrays, so to mutate them you need a reallocation.
    as
    var tmp = placeName;
    tmp.push (a);
    placeName = tmp;

  • through what new fields of contacts and accounts are added?

    through what new fields of contacts and accounts are added?

    Hello

    You can add new fields of contacts and accounts through fields & views.

    Thank you

    Eloqua Experts

  • How to copy a folder to an external hard drive with the same file on it and have it just add new files instead of replace all old already on there, as well as to add new?

    I want to copy a folder to an external hard drive with the file already on it and not having to replace all the files each time. I just want to click and drag the folder to the external hard drive and have it add new files I've added in the folder on my pc over time on the external hard drive. It's annoying to have to replace alllll the files each time.

    Thank you!

    A simple way is to use the second copy of Centered.com software. It is reasonably priced and will do exactly what you want. MS - MVP - Elephant Boy computers - don't panic!

  • Clipboard (Win 7) is "full" and will not copy new data

    My Clipboard (Win 7) seems to have "full" and will accept no new data. He sticks the previous element rather than a new one. Restart it cleared, but it's a pain. Regardless of what I copy to-laptop, Notepad, Word, etc. I read in a manual way to clear the Clipboard, but it should not be necessary. Also read a MS patch 'emptyclipboardtoset', but do not know how to find and download it. Thank you for your help.

    Hello

    The question you posted would be better suited in the MSDN forums. Send the query in the link for assistance.

    http://social.msdn.Microsoft.com/forums/en-us/perfmon/threads

    Hope that helps.

  • Failed to get the disk partition information when you add the new data store

    Hello

    Update my ESX to version 4 Update 1 (4.0.0, 256968). Now, I'm trying to add a new data store to a cluster in vCenter and receive the following error message when I will review the current structure of the disc "error when configuring the host: failed to get the disk partition information. When I click back, then next, there's no error message but in the formatting window, I get the error "Object reference" not set to an instance of an object.

    I see this question has been asked before, but I can't seem to find an appropriate response. Anyone? The interface using CLI instead of vCenter isn't an option (alignment VMFS, workload and so on)

    I use Dell R900 with an EMC Symmetrix VMax SAN

    The size of the LUN I want to add is 741 GB

    Concerning

    Marius Aulie

    If you have a virtual machine for Windows test, you could do the following, to ensure that the logic unit number has a clean partition table:

    -set the LUN as a GROSS physical to virtual machine device

    -Run diskpart, select the drive and run the CLEAN command

    -detach the LUN to the virtual machine

    -try to create the data on the LUN VMFS store

    The size of the block of the data store where the VM test can be a problem with the above. Due to the size of the LUN, the size of the block of the data store must be at least 4 MB. Attach the LUN to a physical test system could be an alternative.

    André

  • [Explanation necessary] Clears the listview data and fill it again with new data

    Hello

    I correctly filled a listview in c ++, data analysed and does interesting things with it. However, I am drunk stumbling, unable to find a way delete and repopulate my display of the list...

    Question 1:

     

    1. How can after I insert data in the list view, I clear the list data and run again the same method (init) who populated the list view with the data in the first place?

    Here are the docs that I referenced and I don't understand how to implement the methods in my code.

    QList - clear() method

    https://developer.BlackBerry.com/Cascades/reference/QList.html#clear

    Using the data access Code, example
                              
    data_access/using_data_source

    GroupDataModel - Clear()

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__groupdatamodel.html#clear

    CODE

    Here is my code - filling of the display of the list of C++ and display of data in a ListView.

    MyApp.cpp

    MyApp::MyApp(bb::cascades::Application *app)
    : QObject(app){
        // create scene document from main.qml asset
            // set parent to created document to ensure it exists for the whole application lifetime
            QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
                AbstractPane *root = qml->createRootObject();
                qml->setContextProperty("yoyo",this);
                //grab references
                list_view = root->findChild("listView");
    
                // set created root object as a scene
                app->setScene(root);
    
                mNetworkAccessManager = new QNetworkAccessManager(this);
                bool result = connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*)));
    
                 Q_ASSERT(result);
                 Q_UNUSED(result);                 json = new QFile("data/file.json");
    }
    
    void MyApp::init(){
        QNetworkRequest request = QNetworkRequest();
         // i call some service here
         mNetworkAccessManager->get(request);
    }
    
    void MyApp::requestFinished(QNetworkReply *reply){
        qDebug() << reply->error();
        qDebug() << reply->errorString();
        if (reply->error() == QNetworkReply::NoError) {
            qDebug() << "No error";
    
                    QByteArray data = reply->readAll();
    
                    if (!json->open(QIODevice::ReadWrite)) {
                        qDebug() << "Failed to open file";
                        return;
                    }
                    json->write(data);
    
            bb::data::JsonDataAccess jda;
            QVariantMap results = jda.loadFromBuffer(data).toMap();
                    QVariantList lst = jda.loadFromBuffer(data).toList();
                GroupDataModel *m = new GroupDataModel();
                       m->insertList(lst);
                       m->setGrouping(ItemGrouping::None);
                       if(list_view) list_view->setDataModel(m);
    
        }else{
            showDialog("Boo",reply->errorString());
        }
    }
    

    MyApp.hpp

    // Tabbed pane project template
    #ifndef MyApp_HPP_
    #define MyApp_HPP_
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    namespace bb {
    namespace cascades {
    class Application;
    }
    }
    namespace bb {
    namespace data {
    class Application;
    }
    }
    
    /*!
     * @brief Application pane object
     *
     *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class MyApp: public QObject {
    Q_OBJECT
    public:
        MyApp(bb::cascades::Application *app);
        virtual ~MyApp() {
        }
        Q_INVOKABLE
        void init();
    private slots:
        void requestFinished(QNetworkReply *reply);
    private:
        QNetworkAccessManager *mNetworkAccessManager;
        QNetworkRequest *request;
        QFile *json;
        bb::cascades::ListView *list_view;
    };
    
    #endif /* MyApp_HPP_ */
    

    hand. QML

    import bb.cascades 1.0
    
    Page{
    Container {
                            background: Color.White
                            ListView {
                                id: listView
                                preferredHeight: maxHeight
                                objectName: "listView"
                                listItemComponents: [
                                    ListItemComponent {
                                        type: "item"
                                        Container {
                                            Container {
                                                Label {
                                                    text: ListItemData.id
                                                }
                                            }
    
                                        }
                                    }
                                ]
                                onTriggered: {
                                    console.log("selected_index: " + indexPath)
                                }
                                horizontalAlignment: HorizontalAlignment.Center
                                verticalAlignment: VerticalAlignment.Center
                            }
    
    }
    }
    

    Question 2:

    How reference to the ListView object with the name "listView" in different parts of the MyApp.cpp file? Is there anything else I should add to the header file to make the accessible listView?

    Question 3:

    What happens when you call the clear() method? How the data model is affected? How the user interface is affected? What happens in memory?

    Question 4:

    How do you verify that the data in the list has been deleted so that you can go ahead and fills again with new data? What is the cheque that I perform?

    I would also like to know how you manage multiple views of lists and data sources in your applications. Best practices or ideas?

    Thank you

    I was able to clear the listview with the following code, if anyone is interested.

    listView.dataModel = null
    

    The dataModel must be set to "null".

Maybe you are looking for