Solved

Fastest way to iterate XML of repeating section (O365)

  • 23 November 2015
  • 4 replies
  • 7 views

Userlevel 3
Badge +9

So I have been able to parse the XML of a repeating section in O365 using Collections and Query XML, but it is SLOW SLOW SLOW, (I havent been able to get it to work using dictionaries)

 

What is the fastest way to just iterate the XML of a repeating section?  Or is the collection method as good as it gets?

icon

Best answer by andrewg 24 November 2015, 02:24

View original

4 replies

Userlevel 7
Badge +17

From Mark Viglione, How do you "use" data in a repeating section?​ a common use is to connect the entire repeating section to a plain text multiple lines of text column in the list (NOTE: it must be plain text).  Then upon submission it will store the xml definition of the repeating section data in that column.  You can then use a Query XML action in WF to retrieve the data and put the items together and process them however you choose.  You can create multiple Collection variables that contain the data for each field in your repeating section on the form, use a for-each loop and Collection actions to put each individual repeated item and then process it however you might want.  The X-Path to get a collection of the column values looks like this /RepeaterData/Items/Item/<column name from the form>.

Userlevel 3
Badge +9

thanks, maybe wasnt clear, i have gotten it to work using the method you described, but it is just slow, is that the fastest way to do it?

Userlevel 7
Badge +17

It seems to be. Do you believe that your loops are slow, or the working with the query? On differing workflows I've had some loops very fast and other slow. The O365 engine will flex in its speeds at times.

Badge +4

I agree with Andrew, For Each + Collections is the fastest way. If you want it to go any faster you might look into a client-side Javascript approach.

Reply