none
Populate InfoPath Form from SharePoint List Workflow

    Question

  • Hello,

    I am using InfoPath 2010 and SharePoint Designer 2010.  I have created an InfoPath Form and published it to a SharePoint Form library.  I have spreadsheet of data (either Excel or Access) that I would like to load into the SharePoint Form Library and somehow generate them all as forms.

    One way I saw someone do in another forum is to have a separate SharePoint List with a workflow that upon an item getting created runs and sends the data into the SharePoint Form Library Template.  http://www.bizsupportonline.net/blog/2009/06/automatically-create-infopath-forms-sharepoint-form-library-sharepoint-designer-workflow/  That seems to work in the video at least for SharePoint 2007.   But I can't figure out how to do it in SharePoint 2010.   And I'm not sure it would run successfully if I imported the data into the SP List.

    Does anyone know how to do that or have another suggestion about loading the data into the forms?  I'm trying not to have to create a VS coded solution and I can't use 3rd party software.

    Thank you,

    JJ

    Sunday, August 18, 2013 9:16 PM

All replies

  • Hi JJ,

    I have done that several times in SharePoint 2010, however, only from one list to another. 

    In my workflows, both the lists were in the same Site as well. 

    In SharePoint Designer, use the 'Copy List Item' action to copy the item from one list to another. 

    As a side note, I have also had to use the Impersonation Step to copy items from one list to another in situations where the permissions aren't the same in both the lists.

    Let us know what errors you run into and we'll brainstorm together to find a solution.

    Thanks


    Daniel Christian (MCTS)

    Monday, August 19, 2013 12:43 AM
  • Thank you for the response Daniel.

    Copying a list to the form library resulted in an Error.  It says make sure source and destination lists have the same columns and settings.  I think this is caused by going from a list to library.

    Instead in my workflow I tried "Create item in -MyFormLibrary-"  Besides my fields, the dialog asks for Content type ID, I chose "Form" and Path and Name, I chose current item Title.  The workflow creates a new item in my form library.  The good news is that it tries to open with InfoPath but in the client instead of in the browser.  The advance setting for the Form Library is set to Open in Brower.  The first time I try opening the newly created item it gives an error that "the form template was created with a newer version of InfoPath.  The form template was created with InfoPath 14.0.0"  When I close the error and try opening it again it gives an error message that the form cannot be opened.  It says it cannot create a new form xxxx.xsn file where xxxx is the Title from the list).

    I think there are changes I need to do with the content type management but I don't know what they are. 

    I'm open to suggestions about how to tackle the task of loading my form library template with pre-existing data from a spreadsheet.

    Please help.

    XML vs XSN

    The problem seems to be that if I create a new form using the form template in the library, it creates an XML file and the link open that file fine in the browser.  When I run the list workflow to create an item in the form library, it creates a link to an XSN file which does not exist. 



    • Edited by TheEdge27 Monday, August 19, 2013 3:13 PM XML vs XSN
    Monday, August 19, 2013 2:23 PM
  • Can I get anymore input to the above?

    JJ

    Tuesday, August 27, 2013 3:35 PM
  • So what are your thoughts on just using something like Datasheet view inside the forms library and have your SP fields and your IP field values synced. Have you enabled this synchronization when you published the IP form?


    Please mark my response as an answer if appropriate.
    Learn.SharePoint.com

    Tuesday, August 27, 2013 3:38 PM
  • Hello,

    The each existing Item's fields in the Datasheet view when updated are reflected in the InfoPath form.  So if I understand what you are saying, they are synched.   The problem is that I can' t just import new data into the dataview and have it generate an InfoPath form.  The items have to exist already so they have an IP form associated with them.  If I have, for example, 200 Excel records of data, I need to manually generate 200 InfoPath forms.  I then can open these dummy forms in the datasheet view and paste in my 200 input records overlaying the dummy values.  Then the individual forms open fine.    I need a way to either 1) generate these 200 dummy forms easily or b) get the 200 actual excel records imported in a means that can be opened in the InfoPath template.

    JJ (The Edge 27)

    Tuesday, August 27, 2013 6:48 PM