#51828
Greg - 10/18/2014 11:54 AM
This has probably been one of the most fun parts for me to create on the site so far...there are so many challenges and so much complicated code to write. I’m trying to make it as "user friendly" as possible. I’m also trying to make it accommodate as many variations of a CSV log as possible. Someone may use a different date format. Some may use metric vs. imperial. Someone may have data elements they want to keep that we don’t have on our dive log.

So far, here is what I’ve done...

The upload page initially uploads the CSV file. Then it reads the first line in the CSV file to allow you to map the columns to the data elements of our dive log. At this point, I need to ensure someone doesn’t choose the same data element more than once. Then it uses your custom mapping to read through the rest of the CSV file to pull in the data and allow you to assign a dive site to each record. At this point, I have to check the data in each column to make sure it matches my required format. For example, I only need numbers for Depth, Time, etc...I don’t need "10 feet" or "55 mins". So my upload process needs to strip the data of "feet" and "mins".

I also need to allow a dive log to be uploaded without the assignment of a dive site. Because if someone is importing a lot of data, I doubt they are going to sit there and select dive sites all day.

I also have to figure out a way to save the data mid-page, because it would suck to work through a bunch of logs, only to loose the data because of a session timeout.

These are just some of the fun challenges of this project! Hopefully I’m up for the task :)