Monday, October 13, 2008

Bug fix for Migration Tool uploaded

I wrote a CSV to Infopath migration tool ages ago and posted it to Codeplex.  At the time, I'd been tasked with migrating a Notes database to Sharepoint, and came up with an idea that I could dump the Notes database to a CSV file and rig together a tool to generate Infopath files based on that.  I spent a couple of weeks working on it after hours, and came up with something that worked.
Barely.

Then, the project went onto the back-burner, and we decided to go with the Notes to Sharepoint migration tool that Quest software makes.  I forgot about the project, and abandoned working it. 

Last week, VP asked me about the original project that started all this.  I told him that the original site I'd built was gone, as I'd not migrated it when we moved our test server to new hardware.  He told me to rebuild the site, which I was quickly able to do, as I'd saved the Infopath templates I'd originally created.  I then fired up my migration tool, and found that....it was better than I'd remembered.  

Don't get me wrong, it's a fairly limited tool (no file attachments, repeating field support is iffy at best) but it was very simple to use, and I was quickly able to migrate the 2,000 or so records from the database over to Sharepoint.  I then looked at the Codeplex site and discovered, to my surprise, that I had over 80 downloads.  I also had a bug report from early September that I hadn't noticed.  

I quickly reproduced the bug, and wrote a fix for it.  I've just posted this new version.  I've also decided that the tool is good enough that it deserves some more work.  I'm going to rewrite it to get rid of some of my more atrocious design flaws.  For example, I'm currently writing every file twice.  The first time, writes a copy of a blank file.  I then read the file I've just written, edit it, then write it again, replacing the original file.  Yes, I'm aware now that this is completely insane.

So, I think I have the makings of a pretty good, and valuable tool.  The foundation isn't the best, but I should be able to rework that pretty easily.  The basic approach and interface are pretty good though, I think.  I don't think I'll ever be able to handle file attachments, but for simple migrations, this could be a very useful bit of software.

If you want to download the current version, it's available at http://www.codeplex.com/csvtoinfopath

4 comments:

Chih said...

Thank you for creating such a great tool! We've been using it at work but came across an interesting issue. Is there any ways to not have the filename sequentially numbered? In the conversion tool window, at the very end, it asks for a field you would like to use for the creation of the filename. However, no matter which field I select, it automatically adds a sequence number at the end of the filename. This is especially problematic for us because we are using a field that is already a number to name our files. Secondly, when an end user opens one of the converted files to edit and submit again, it creates a new file because it doesn't recognize the created filename from the conversion.

Anonymous said...

Hello

I cerate an simple contact infopath form and accordingly CSV file also.

After mapping the file forms generatedd successfully, bu datas are not populating.

Here is Contact infopath xml
---------------








-------------------

and here is CSV file
-------------
Date,Project,PreparedBy,Manager,Email,Department
1/1/2007,1,Thomas Conté,Har3ry Cover,tconte@microsoft.com,Finance1
2/1/2007,2,Bernard Barnier,Harry Cover,bbarnier@microsoft.com,Finance
3/1/2007,3,Charles Duchemin,Harry Cover,cduchemin@microsoft.com,Finance
4/1/2007,1,Ludovic Cruchot,Harry Cover,lcruchot@microsoft.com,HR
5/1/2007,2,Claude Ratinier,Harry Cover,cratinier@microsoft.com,HR
6/1/2007,3,Jean Durand,Paul Dugenou,jdurand@microsoft.com,HR
7/1/2007,1,Paul Martin,Paul Dugenou,pmartin@microsoft.com,HR
8/1/2007,2,Gaston Lagaffe,Paul Dugenou,glagaffe@microsoft.com,IT
9/1/2007,3,Paul Marcel,Paul Dugenou,pmarcel@microsoft.com,IT
10/1/2007,1,Marcel Paul,Paul Dugenou,mpaul@microsoft.com,IT
----------

Please let me know whats wrong I am doing here.

Avian

Anonymous said...

---------------
my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2012-07-10T07:58:00" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-us">







-------------------

Johnny said...

Hi, I used this tool a lot and somehow lost the code. Is there anyway you can send me the code again?