I was trying to figure out how to migrate content from InfoPath documents into SharePoint lists. I came a blog posting that was a great help to getting me started. Olivia Stewart of DocPoint Solutions posted a blog on moving data from an InfoPath document with repeating tables to a SharePoint list.
I am using an InfoPath form for simple project management in a SharePoint 2013 document library. My goal is replace my dependency on the InfoPath form. Thus, I need to extract the data from each InfoPath document and store it in custom SharePoint lists. Then I will transform the InfoPath form into a Nintex form using the FormTrek tool.
In this first in a series of four blog posts, I will describe the current InfoPath form and list that I am using. I kept it very simple.
The web version of the project form with data appears below. There are four fields in the main Project section of the form. Three task fields are contained in a repeating section.
The InfoPath form version of the form appears below.
I can download a copy of the xml of one of the documents from the SharePoint document library.
Now I can view the XML that is contained in the InfoPath document. I will need this XML later.
<?xml version="1.0" encoding="utf-8"?> <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:Project-Management-Forms:-myXSD-2018-05-05T18-17-16" solutionVersion="188.8.131.52" productVersion="184.108.40.206" PIVersion="220.127.116.11" href="http://server2012sp/sites/testsites/Project%20Management%20Forms/Forms/template.xsn"?> <?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.3"?> <my:myFields xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2018-05-05T18:17:16" xml:lang="en-US"> <my:ProjectName>First Project</my:ProjectName> <my:ProjectOwner>John Owner</my:ProjectOwner> <my:Description>This is the first project</my:Description> <my:Department>Human Resources</my:Department> <my:group1> <my:group2> <my:TaskName>Gather requirements</my:TaskName> <my:TaskDetails>get a list of requirements</my:TaskDetails> <my:TaskOwner>Amanada Boss</my:TaskOwner> </my:group2> <my:group2> <my:TaskName>Set categories</my:TaskName> <my:TaskDetails>set the business and function categories</my:TaskDetails> <my:TaskOwner>Bob Manager</my:TaskOwner> </my:group2> <my:group2> <my:TaskName>Set priorities</my:TaskName> <my:TaskDetails>set the task priorities</my:TaskDetails> <my:TaskOwner>Jane Task</my:TaskOwner> </my:group2> </my:group1> </my:myFields>
Next I create two custom lists on my SharePoint 2013 server. The first custom list is called Project Main.
I added the four main fields from the Project form. In my example, I changed the Title field to Project Name. The Project ID field stores the value of the Note ID.
Later, I use the Project ID value to establish a relationship to the project detail task records in the second custom list. The relationship is defined in a Nintex form that uses a repeating section.
The second custom list is called Project Details.
The three task fields, the Project Name field and a Project ID field were added.
The Project ID column is set up as a Lookup column.
The Project ID lookup column is configured to look up the values in the Project Main list. This defines the relationship between the Project Detail items and the Project Main item. Thus, I will know which Project Detail items belong to which Project Main item.
I can also configure the relationship between the detail list items with those of the main list items. That is, I can configure what happens to the detail list items when the main list item is deleted.
Workflow Action Settings
I make sure that I have the following workflow actions enabled in Central Administration \ Nintex Workflow Management (on SharePoint). These are the workflow actions that I plan to use.
Next, I need to create two custom workflows to extract the data from the InfoPath documents to the new custom lists. See my next blog post for these details.