Solved

XML "simple" count of Node items returning error

  • 19 November 2015
  • 6 replies
  • 39 views

Badge +7

Hi,

I have a Repeated Section in Nintex Forms for Office 365 and for now I just want to extract the number of repeated items in that section just as follows;

 

REPEATED SECTION TEXT ONCE FORM IS STORED:

<?xml version="1.0" encoding="utf-8"?>

<RepeaterData>

  <Version />

  <Items>

  <Item>

  <ItemTitle_x0020_ type="System.String">this is title 1</ItemTitle_x0020_>

  </Item>

  <Item>

  <ItemTitle_x0020_ type="System.String">this is title 2</ItemTitle_x0020_>

  </Item>

</Items>

</RepeaterData>

 

Workflow Action Query XML only does this:    count(//RepeaterData/Items/Item)   (screenshot)

Nintex_Workflow_for_Office_365.png

 

And when ran the Workflow log shows me an error "The request cannot be processed due to internal error" but nothing else.

 

any idea ?

 

screenshot of the error:

Workflow_Status.png

 

thanks,

Francois

icon

Best answer by cju 9 February 2016, 20:55

View original

6 replies

Badge +7

Update: after talking to Support it came clear that even a simple XML was erroring so we decided not to waste more time with that action and use Dictionary actions instead which work much better to get he XML node as dictionary collections.


Not sure if there is therefore a bug in the XML action but use Dictionary was the answer for me. 


I will post more details when time allows. 

Userlevel 5
Badge +9

I've tested and I have the same error.

I think that this is not supported.

The following XPath works : //Items[count(Item)>1] but when count() is placed at the beginning of the XPath query it throws an error. Maybe because it tries to return text from xml...

Badge +7

thank you for testing Caroline Jung​ , would be interesting to see how it behaves on premises, because I suspect the action is slightly different behaviour on Office 365.

Userlevel 5
Badge +9

I've also tested and it's the same behaviour in OnPrem

Badge +2

How did you fix the problem? Vadim has a UDA but I can't use that because it uses control from the form as a input. Can you please post your solution? Thanks in advance.

Userlevel 7
Badge +17

You have to save nodes you want to count into Collection and then count items in collection. Advanced xPath methods are not supported in regular expression actions, in Nintex unfortunately. 


Regards,

Tomasz

Reply