O365 WF + responsive form: query repeating section fails with 'XML content is invalid. Data at the root level is invalid. Line 1, position 1'

  • 19 March 2018
  • 1 reply
  • 12 views

Badge +3

My responsive form has a repeating section called repExtraActions, connected to a multiline text field in my list. The xml data in this field looks like this:

 

<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><calcExtraActionRowNumber type="System.String"></calcExtraActionRowNumber><lkupExtraActionInstruction type="System.String">6</lkupExtraActionInstruction><pgExtraActionAssignedTo type="System.String">18;#i:0#.f|membership|robert@contenu.nl</pgExtraActionAssignedTo><dtExtraActionDateCreated type="System.DateTime">03/19/2018 00:00:00</dtExtraActionDateCreated><boolExtraActionCompleted type="System.Boolean">False</boolExtraActionCompleted><dtExtraActionDateCompleted type="System.DateTime">03/19/2018 00:00:00</dtExtraActionDateCompleted><pgExtraActionCompletedBy type="System.String"></pgExtraActionCompletedBy></Item><Item><calcExtraActionRowNumber type="System.String"></calcExtraActionRowNumber><lkupExtraActionInstruction type="System.String">7</lkupExtraActionInstruction><pgExtraActionAssignedTo type="System.String">18;#i:0#.f|membership|robert@contenu.nl</pgExtraActionAssignedTo><dtExtraActionDateCreated type="System.DateTime">03/19/2018 00:00:00</dtExtraActionDateCreated><boolExtraActionCompleted type="System.Boolean">False</boolExtraActionCompleted><dtExtraActionDateCompleted type="System.DateTime">03/19/2018 00:00:00</dtExtraActionDateCompleted><pgExtraActionCompletedBy type="System.String"></pgExtraActionCompletedBy></Item></Items></RepeaterData>

I use a Query XML action to extract the Item data into collections (see screenshot). The WF starts but suspends with the error message "XML content is invalid. Data at the root level is invalid. Line 1, position 1". What am I doing wrong? 


1 reply

Badge +3

I solved this myself. Turns out my query was faulty. With above XML in a multinline text field in my list, I should have configured the Query XML action as follows:

XML source: name of the multiline text list column connected to the repeating section, query as Content

XPath query: //Item/[name of form control inside the repeating section]

Return result as: Text, to a collection variable

Repeat for every control in the repeating section.

Reply