Importing using "Upload CSV Data"

Discussions for the HanDBase for iPad and it's conduits and desktop add-ons

Importing using "Upload CSV Data"

Postby larutril » Sat Dec 07, 2013 1:00 pm

I am exporting customer data from an existing desktop app to a CSV file for importing on to an iPad. I have opened the HanDBase Database list in the desktop browser and clicked the sync button on the iPad. I then enter the "Applet Name" which is an existing database called "Customer". I browse for the CSV file and select it. Then I click "Add CSV Data".

Yes, it works great. My objective is to periodically export data from the desktop app, but not to ever import back. Users will carry the iPad for reference purposes only.

My question, adding the CSV data appends to the existing database, is there an easy way to overwrite/replace?

Thanks in advance!
larutril
 
Posts: 9
Joined: Mon Sep 23, 2013 3:19 pm

Re: Importing using "Upload CSV Data"

Postby Brian_Houghton » Sun Dec 08, 2013 2:35 pm

Hi,

Right now the CSV upload will always merge with what is already in the database on the device. Due to this I have to recommend deleting records in the iPad database prior to importing.

Sent from my Nexus 7 using Tapatalk HD
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: Importing using "Upload CSV Data"

Postby larutril » Sun Dec 08, 2013 4:47 pm

Okay. Thank you.

An additional question. Does the CSV file import assume the first line has field names? And if so, does it import strictly by field order of field name? I'm trying to format my CSV export to match the required format.

Also, is it possible to sync with a CSV file sent by email or saved in Dropbox? or only with a matching PDB? If so, It's not clear to me how to do this and I'd appreciate it if you could point me in the right direction.

Thx.
larutril
 
Posts: 9
Joined: Mon Sep 23, 2013 3:19 pm

Re: Importing using "Upload CSV Data"

Postby Brian_Houghton » Mon Dec 09, 2013 6:38 am

Hello,

Thanks for following up. The CSV file should indeed have field names as the first row.



The easiest way to import a CSV file from your computer to a HanDBase database on your handheld device is to use the steps listed below:

1. Connect your handheld device to your wifi network (has to be the same one your computer uses)
2. Open HanDBase on the handheld device
3. Tap the Connect icon (on the database selection screen)
4. Open a web browser on the computer
5. Enter the IP address that is shown on the handheld device's screen (http://xxx.xxx.xxx.xxx:8080)
6. Let the Desktop Connect page appear
7. In the upper right corner of the Desktop Connect page, select the option to choose a file to upload
8. Select your CSV file
9. In the second field, supply a name including the .pdb extension
a. If you supply the name of a database that already exists, the records in the CSV file will merge with those in the database that exists (this assumes data is in like field types)
b. If you supply the name of a database that doesn't already exist, the records will be added to a new database, with the first row defining field names and all field types becoming text in type (you can change this later via Database Properties - Fields)

Hope this helps with converting/importing a CSV file into a HanDBase format database.

Sent from my Nexus 7 using Tapatalk HD
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: Importing using "Upload CSV Data"

Postby larutril » Mon Dec 09, 2013 1:35 pm

Thank you Brian. Those were the steps I described taking in my first post and I appreciate the clarification.

However, my second question was really about whether the CSV import simply uses field order or do the field names in the first line serve as a map to the fields in the PDB?

Thx!
larutril
 
Posts: 9
Joined: Mon Sep 23, 2013 3:19 pm

Re: Importing using "Upload CSV Data"

Postby Brian_Houghton » Tue Dec 10, 2013 6:57 am

The CSV import will rely on the field order, but the field names also need to be there.

Sent from my Nexus 7 using Tapatalk HD
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: Importing using "Upload CSV Data"

Postby larutril » Wed Dec 11, 2013 4:08 pm

Okay. Thanks, but I'm still having some issues.

When I create fields in the "Edit Fields" screen they are initially titled "Field 1", "Field 2", etc. When I use "Change Field Order" I can later rearrange the order of the fields I have created. Additionally, I have several Relationship fields that don't have a corresponding field in the CSV as the contents are displayed based upon the relationship. The relationship fields are in the field order list above other fields that receive data from the CSV.

My question, is the "import field order" the "Field Order" list minus any relationship fields? Or do I have to include empty columns in my CSV as place holders for the relationship fields?

Thanks in advance!
larutril
 
Posts: 9
Joined: Mon Sep 23, 2013 3:19 pm

Re: Importing using "Upload CSV Data"

Postby dhaupert » Wed Dec 11, 2013 4:16 pm

Hi there,

The format the CSV import has to match that of the CSV export. My best advice is to export your database first and see what the output looks like, and that's the format that you'll need to import things back in.

On the desktop the CSV import tool is much more configurable- you can choose the order, map fields, etc. The one on the device was honestly meant to make it possible to import the file another copy exported which is why there are no options for it!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Importing using "Upload CSV Data"

Postby larutril » Wed Dec 11, 2013 7:17 pm

Hypothetical. If I were to import my CSV to a new PDB and then add the relationship fields could I then reorder the fields (ie. move the relationship fields up) and still delete all records and do a new import from an identical CSV to the existing PDB?

I'm really sorry if I'm not being clear. I really appreciate your help.
larutril
 
Posts: 9
Joined: Mon Sep 23, 2013 3:19 pm

Re: Importing using "Upload CSV Data"

Postby Brian_Houghton » Thu Dec 12, 2013 6:51 am

You can reorder the fields in the database, so long as the fields (columns) in the CSV file are in the same order.

Sent from my Nexus 7 using Tapatalk HD
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Next

Return to HanDBase for iPad

Who is online

Users browsing this forum: No registered users and 1 guest