Importing

Viewing 7 reply threads
  • Author
    Posts
  • September 1, 2019 at 2:56 PM #36658

    john cesta
    Participant

    What a wonderful application.

    I recreated my insurance biz app on my iPad with TF.

    Now the question is:

    1. Is there a way to duplicate my form so I can use it for testing ?
    2. And, I have an export of all my previous written business sales records. Basically they contain the same data as my TF dB. If I import these records assuming the fields align with the TF fields will the new fields data take on the calculation formulas in TF?

    In other words, I don’t want TF to calculate anything as the values are already set, I just want to get the old sales records into TF without screwing any of my form up.

    I want to do this also with my customer records.

    Thanks,

    September 1, 2019 at 10:42 PM #36663

    Sam Moffatt
    Participant

    I’m not as sure about how to do this on iPad as I do most of this on the Mac and sync it over using CouchDB to my iOS devices however you should be able to do all of this on iOS as well.

    1. I duplicate the entire document and then export the forms to a new document from time to time. If you use the duplicate option in Tap Forms on a document, it’ll give it a new document ID and isolate it for you. This is useful for testing, making sure sync doesn’t accidentally go somewhere you don’t intend and gives you the confidence that you can delete everything and start from scratch. The other thing I do is export the form template and load it up into temporary documents to toy with things.

    2. You can recalculate either an individual record or all records in a form. To recalculate an individual record, on iOS you can drag down a record to recalculate it’s formulas and on the Mac use the refresh button at the bottom of the record layout or use the menu to go to “Records” > “Refresh Selected Record”. To recalculate an entire form, on iOS you can drag down the record list to recalculate and on the Mac use the refresh button at the bottom of the list for the view you are using or use the menu to go to “View” > “Refresh Records List”. Tap Forms will automatically recalculate a calculation when you change a referenced field unless you have the calculation field set to “Calculate only one time” (useful mostly for functions that use UUID() or some other fixed, one time operation). Similarly when you click refresh/drag down, it will ignore any “Calculate only one time” fields as well.

    That said if you’re happy to wait a moment, refreshing an entire form isn’t the end of the world. I do it on my calculation and script heavy forms all of the time and it’s only a mild inconvenience. Many of my script fields also invoke web API’s hosted within my network, so I can easily see when I make that mistake. I do wish if Tap Forms notices it’s taking longer than a few seconds to recalculate that it gave some sort UI popup indicate where it’s at with stuff.

    September 2, 2019 at 7:31 AM #36666

    john cesta
    Participant

    Yup, you were right. I’m exporting and importing all my previous business records with great success.

    September 3, 2019 at 3:12 AM #36671

    Sam Moffatt
    Participant

    Great news! :)

    September 3, 2019 at 10:05 AM #36673

    john cesta
    Participant

    Now here’s the big question.

    I import a CSV file.
    TF pulls it all in and creates all the field names accordingly.
    They are designated as TEXT
    SEE my attachment
    When I change the field type to say date the data is gone.

    Scenario two

    I do the same as above and change all the data type to the types they should be. Phone to phone date to date etc.

    Then I delete all the records and import again.
    They import again but the dates in the csv file don’t import.

    Is there a way to do this without losing any dates or other types of data?

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    September 3, 2019 at 10:14 AM #36675

    john cesta
    Participant

    Only really seems to be dates that don’t convert over (or so I think)

    Emails and phone numbers change ok.

    September 3, 2019 at 1:01 PM #36677

    Brendan
    Keymaster

    Emails and Phone Numbers are really just text, so switching them to their respective field types is no issue.

    But a Date is something special.

    You have to look at the date format you’re using for the field in your form and make sure that the format of the data matches that exactly.

    It works better also if you import into an existing form so you can pre-set the date format before you import the records from the CSV file. Tap Forms will use the date format you specify on your Date field to parse the date values from the CSV file during the import process.

    Here’s an example of how important it is to get the date format right…

    1/2/2020

    2/1/2020

    Which one is February 1, 2020? And which one is January 2, 2020? The computer has no idea unless it’s told that the format is actually dd/MM/yyyy. So with that format, the first one is February 1st and the 2nd one is January 2nd. But it could have been the other way around if the date format specified was MM/dd/yyyy.

    So you can’t just switch the field type to Date after import because Tap Forms doesn’t know what the format of the Date field should be before the field type switch. That’s why it’s better to setup your form and then import into it rather than letting Tap Forms create the form for you. Or you can let Tap Forms create the form for you, then set the field types and date format, then delete all the records and import into that now already existing form.

    Alternatively, on the Import & Export Settings screen in the Tools area, you can specify the Date Format to use for importing all dates. But then all dates must be in the same format for every date field you’re importing.

    September 3, 2019 at 2:10 PM #36678

    john cesta
    Participant

    Yes, you were correct brenden.

    It worked.

    Thanks.

Viewing 7 reply threads

You must be logged in to reply to this topic.