4

CSV Import Wizard

Hello everyone,

Since a lot of our community members are interested in ways to automate the import of a CSV file, I decided to put together a complete working example database to show how to do it.

I'm happy to share the attached database and a sample CSV file with you. The file contains data on attendees of various events. Here are some things I've put into action:

  • There's a Dashboard where users can upload their CSV file. There's no need for an intermediate import table.

  • Don't use "Select" statements. Just rely on "References" instead.

  • Use the script on the server side to speed up the import process.

  • Check for duplicates in all three tables — Contacts, Events, and Attendees.

Happy coding!

9 replies

null
    • Rafael Sanchis
    • Rafael_Sanchis
    • 3 days ago
    • Reported - view

    Hi Sotirios, 

    It works great on the public web, but I don't know why it doesn't work on my Android app.

    Thanks for your work.

      • szormpas
      • 3 days ago
      • Reported - view

         Hi,

      Since the main code is running on the server side, I'm not sure why it's not working on your Android app. Unfortunately, I don't have an Android device for checking.

    • gold_cat
    • yesterday
    • Reported - view

    Great example! Is it possible to use it offline?

      • szormpas
      • yesterday
      • Reported - view

       Thanks. Can you check this in your app?

      • gold_cat
      • 21 hrs ago
      • Reported - view

       
      I've tried it, my friend. The local version can't be used this way.

      • szormpas
      • 21 hrs ago
      • Reported - view

        OK, remove the "do as server.......end" from the main code inside the button.

      • gold_cat
      • 18 hrs ago
      • Reported - view

       

      Hi Sotirios, 
      I did try this way, but it didn't work.

    • szormpas
    • 16 hrs ago
    • Reported - view

    I see the problem now. The main script depends on the shareFile() function to create a link of the CSV file, and I guess that's not possible locally.

    So, the solution above only works for the web.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 15 hrs ago
      • Reported - view

       

      Hi Sotirios.

      Android app might not support shareFile or http("GET", ...) for shared files in the same way, or may not have permissions to access external URLs.

Content aside

  • 4 Likes
  • 15 hrs agoLast active
  • 9Replies
  • 44Views
  • 3 Following