Monday 14 September 2015

How-to Read an XML / InfoPath Form Values and Upload to Word Document in Document Library using Nintex Workflow

Hi,

This article will help you to read InfoPath/XML fields using Nintex workflow after form created.

Create new workflow to the Form Library where your InfoPath will save and fallow the steps below.

Step 1:

Step 2:

Double click on "Query XML" box or click on Configure option in Query XML-menu.









Step 3:

Now you able to see below screen, in this you need to select XML- Source.
If you are working for the InfoPath in the current Form Library then select Current item or you can give XML file URL using URL or you can give direct XML source text using XML.


Step 4:

For example below is my XML format text in the InfoPath form.



Now you need to create Workflow variables to save each XML tag data like below.










You can Add. Delete and Modify the Variables by using below options.




Step 5:

Now close the Variable popup and come to Query XML setting.

In Output 1 tab select Xpath in Process Using: like below.


If you want to read multiple values just click on "+ Add Output" link and add few more Output fields like below.




Step 6:

Now you are ready with all variables which are having XML field values you can use this variables for your reqirement, just save the workflow and publish the workflow.

Here my requirement is like, i have to update a word document with this Output Variables so i updated like below.


First add Update Document action to workflow and open it.



 Need to pass your workflow variables into document Content Controle or (Quick Parts).





Now you are ready with your complete workflow, make this workflow to run at item created time,  save it and publish it.

I hope this will help you ......

No comments:

Post a Comment