Hi,
I've been trying to read repeater xml following Vadim's blog at http://www.vadimtabakman.com/nintex-formsworkflow-parsing-repeating-section-data.aspx but I can't get it work correctly.
For test I have 3 fields - txtFirstName, txtLastName and txtAge (numeric)
The repeater is called repTest
I query get the FormData and use the inline function fn-XMLDecode and set it to a variable that I would then like to use XML Query on.
When I query that variable I can only seem get results if I use //repTest (which is the name of the repeater control)
If I use any other XPath expression I don't get any results. (with the exception of node() and //*)
example:
Form Data
<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><txtFirstName type="System.String">first</txtFirstName><txtLastName type="System.String">last</txtLastName><txtAge type="System.Int32">11</txtAge></Item><Item><txtFirstName type="System.String">first2</txtFirstName><txtLastName type="System.String">last2</txtLastName><txtAge type="System.Int32">22</txtAge></Item></Items></RepeaterData>
Decoded Form Data
<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><txtFirstName type="System.String">first</txtFirstName><txtLastName type="System.String">last</txtLastName><txtAge type="System.Int32">11</txtAge></Item><Item><txtFirstName type="System.String">first2</txtFirstName><txtLastName type="System.String">last2</txtLastName><txtAge type="System.Int32">22</txtAge></Item></Items></RepeaterData>
//repTest
firstlast11first2last222
//repTest//txtFirstName
//repTest/*
I've tried variations with //RepeaterData/Items/Item etc. (as per the xpath builder)
I've also tried just running a query on the decoded xml document (just pasted the xml shown in "Decoded Form Data into the XML Query source) and XPath like //txtFirstName. This works fine.
I'm assuming I'm missing an in between step to get the XML properly formatted. I thought I was doing that by using the build string action and fn-XMLDecode but I'm not having any luck with it.