SubForm Custom Sort - Deluge Workflows

SubForm Custom Sort - Deluge Workflows

I have been experimenting with the Custom Order function of Subforms, it works beautifully within the subform itself and retains the sorting order.

However, I need to be able to iterate through the records in Deluge using the sort order (The usage case is that I have a Page with an HTML Snippet I use to display information from the form and subform. In this page the order of the records needs to match the subform order)

The SubForm is created from another Form in the application, so when I use Deluge to iterate through I have 2 options that I am aware of.

In the example where the parent form is Form_A , with a subform called Items which is based on Form_B

1) Use for each x in Form_B[Form_A == With some parameters to identify the records in Form_A]
2) Use for each x in Form_A.Items

In both those scenarios, the sorting in the subform does not appear to be preserved and I am served the original (created) order of the records.

I wouldn't expect Method 1 to work in that way, I am calling the records directly from Form B so the subform order is irrelevant. However, in my opinion, Method 2 should pull those records through in the order they are displayed in the subform.

I don't believe there are any sorting options I can use to identify the row number, so how can I get it to sort in this way?

I did notice that in the HTML code the subform does refer to a rowno element which is consistent with the sort order so how can I use this to iterate through my records?