Copy Form to add changes and update.

Viewing 5 reply threads
  • Author
  • November 16, 2023 at 10:22 AM #50137

    Glen Forister

    I finally had the time to do the

    Copy Form to a new Form in the same document.
    I then made my changes in the copied Form and added 2 fields to hold the Java Scripts.

    I then Exported my revised data in the original Form into a CSV file.
    I also had to rename a couple fields when I imported into a spreadsheet.
    I also had to the delete the data in one field so the Javascript could work properly.

    I then imported the altered CSV file into the new copied Form with the desired Form changes.
    Unfortunately, the changes didn’t happen and the added records didn’t get imported even thought the feedback and temperature graphic showed it was happening.

    Basically nothing happened and the new Form didn’t get updated.

    What is the correct process if it isn’t the one detailed below in a previous posting?

    =======  Process determined in an earlier posting  ================================

    Ok, so really, the only safe way to create a copy to work on changing the Original Form, is:

    1. Duplicate the Form.

    2. Work on the changes wanted, including renaming fields, moving fields, adding fields and all the changes in properties required in the Duplicate Form.

    3. Export data as a CSV file from the Original Form which you are still adding data to while work on the Duplicate Form was proceeding.  Make sure the Export Record IDs option is turned OFF. If you don’t, Tap Forms will just update the existing records when you re-import the CSV file.

    4. Import that data from the Original Form into the new Duplicate Form.

    5.  During the Import process, make sure the data in the old Form is directed to the correct field in the Duplicate Form.  I haven’t done this much in TF, so I don’t know how much ability there is to make sure the previous is possible, but I’m sure you made that possible.

    Thanks for clarifying the traps involved with the Archive file.  Basically, don’t use it for this purpose or it will prove dangerous to you eventually.

    Let me know if I’m correct or need to change something.

    November 17, 2023 at 11:41 AM #50139


    Did you remember to turn OFF the Export Record IDs option before you exported?

    Also when you imported, did you have the Add Missing Fields to form option turned on? If you renamed fields outside of Tap Forms that may have been why those didn’t get imported.

    And on the Import Records screen did you have your form selected? Or did you have it set to “New Form”?

    November 17, 2023 at 12:05 PM #50142

    Glen Forister

    I may have missed something.  I had exported in TAB but the file is .csv, so I think I chose that item.

    The import did happen, but now instead of a few added records, the records doubled.  Oops, now I have every record with it’s copy.

    How do I prevent doubling the records, and just update the records that are there?

    I guess I’ll save my new Form with the added fields and JavaScript into a Form Template file and start a new Form using the template and import the records to get to where I want to be?

    Question:  If I need to work on the new form some more, how do I update the records from the original working Form into the new Form without doubling it again?

    November 17, 2023 at 12:23 PM #50143

    Glen Forister

    I just did:
    Copy New Form to another experimenting Form.
    Then imported the data file into it and ended up with just 3 records which were only the added record and the 2 changed records.

    Where are all the other records.  And, the calculations (not JavaScript) don’t work, but the names of the fields in the calculations are right.  Do they have to be redefined?

    This is ridiculously problematic.  I never had any trouble like this in HanDBase when wanting to do this.

    November 19, 2023 at 4:53 PM #50144


    When you don’t export the records with the Enable Record ID option turned ON, then you import back into the same form, you will get duplicated records because Tap Forms doesn’t have the form_record_id column that helps it to identify existing records when you re-import into the same form.

    Calculation fields would need to be re-created because the formulas aren’t stored in the CSV file.

    Take a look at the CSV file directly using a program such as TextEdit or BBEdit. You’ll see there’s no data about each fields other then the field type if you’ve enabled that option for export. So formulas and not in the CSV file.

    November 19, 2023 at 5:25 PM #50145

    Glen Forister

    OK, that helps some.  All I gotta do is make a list of all the things relating to this and hope I can get it right the next time.


Viewing 5 reply threads

You must be logged in to reply to this topic.