Export Infopath Data to a txt file - InfoPath Dev
in

InfoPath Dev

Export Infopath Data to a txt file

Last post 12-16-2009 11:08 PM by Qazi Anis. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-15-2009 11:50 AM

    • ramii
    • Not Ranked
    • Joined on 02-02-2009
    • Posts 13

    Export Infopath Data to a txt file

    Hi all,

    I have a  Timerjob that runs on a browser enabled FormLibrary & acts on all the documents in it. Timerjob should be able to output values in infopath(Full Trust, 2007 form) onto a txt file in some other location with a specific layout. I have written the timerjob that runs on FormLibrary. Now I need to get the data in the form exported to txt file.

    I was having basic steps in my mind

    (1)Generate Text file content ( from the infopath form, I was also be able to extract required fields data)
       
                     string TestBoxXpath = "/my:myFields/my:FormName/my:Name";
                     XPathNavigator TextBox = MainDataSource.CreateNavigator().SelectSingleNode(TestBoxXpath, NamespaceManager);

    (2)Access the file system, where the txt file to be stored.
    (3)Add contents to txt file, save & Close.

       //System.IO;
                TextWriter tw = new StreamWriter("date.txt");
                 tw.WriteLine(TextBox.Value);
                 tw.Close();

     I had all these basic things in my mind. Can anyone suggest me how to work with these in overall. Any link where I can get info at. I really appreciate your time.

    Thanks,
    Ramii

  • 12-16-2009 11:08 PM In reply to

    Re: Export Infopath Data to a txt file

    hi,

    i think you have a fairly good idea of what you want to implement.

    i would recommend following steps

    1) generate the text file in infopath form itself. place all the contents in a single field and promote it. 

    2) create a utility that reads this field (use spobjects) and stores it somewhere. the utitlity will need to run on server.

    that is all you need to do. It is little bit of coding i think

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.