SQLite 3 to Tap Forms Script
by T. L. Ford

About Converter

This script is most useful for SQLite 3 databases with multiple tables with many fields.

While it's possible to export SQLite 3 data to CSV files and import them directly, this script automates the export of the CSV files *AND* builds a simple Tap Forms JavaScript function to create the forms with correct data types. You can then import the CSV file to the created form.


This script is provided as-is without any responsibility to your stuff.

This script has NOT been extensively tested. It works on *my* SQLite3 databases, but may experience some glitches I'd not encountered. Please email me if you find issues that can be fixed (bonus points if you provide the solution).

See the notes in the port.bash file.

How to Use Script

Download port.bash.

Copy port.bash and your sqlite3_data.db to an empty directory.

Open Terminal and change to the directory/folder you copied the files to. Example:

cd /Users/tford/tapform_sql

Make the port.bash file executable.

chmod +x port.bash

Run the port.bash script.

./port.bash yourdatafile.db

Open the newly created build_forms_js.txt file in TextEdit (or editor of your choice).

Highlight all of the text and copy it.

If you don't want to use TextEdit, you can continue in the Terminal with:

cat build_forms_js.txt | pbcopy

which will copy the JavaScript directly.

Open the Tap Forms database you want to import into.

Create a new script on a form. The name of the script does not matter.

Edit the script.

Highlight and delete the default text.

Paste the build_forms() function and command.

Run the script.

Forms will be created with fields. (The 'New Field' field is a default that needs to be deleted.)

Import the created CSV files for each form.

Adjust forms - you will need to do some tweaking.

If you find this useful, please consider buying or sharing one of my books. Thanks!