

Though each iteration of the loop, we need to extract the value of the Code node for that particular user. The Loop action will continue to loop through while the numIndex variable is less than the count of the users that we retrieved earlier. Next is to go through a loop of every User in the XML. I’m storing the count in a Text variable (you can use a Number variable, but in order to get my head around the Convert Value new action, I thought I’d do this the long way). The XSLT looks more complicated than it actually is. I use the Query XML action, point it to my XML file (Current Item) as the input XML, and am using XSLT to retrieve a count of the User nodes. This will be used later, to loop through each user and update their Code node based on some calculation. In order to update just the Code node for every User in my XML file, I first needed to find out how many users I have. When you are planning on performing a simple update on some XML, all you really need to the XPath to get at the node that you want to update, and then provide the value you want to set. You can see from the workflow screen shot that it isn’t really a complicated workflow. In this particular case, I’m reading the Code node, adding some number and then updating that Code node. If this was an InfoPath form, we might be updating some value such as a date field or an amount that was calculated through a workflow. My plan was to update some XML node in every User node in my document. So to get my head around using this action, I created a small XML file : Īnd added it to a document library. Having the ability Query XML in Nintex Workflow, using XPath or XSLT to translate it has been a great part of the product, but with the latest release (Build 11000), we can finally Update XML. Part 2 – Nintex Workflow – Update XML Part 2 – Updating InfoPath Forms
