I know there have been many posts regarding the data structure of
repeating groups and tables but I've searched for countless hours with
no luck. I've tried many examples to loop through the data with
either errors or I can't seem to get the syntax quite right. What I'm
trying to do is retrieve all available data and then use that data to
send a message if a value is T/F. My plan is to construct an HTML
table when I send only to those selected as an action item from a
repeating table. My only road block has been the loop. I can select
all the nodes in the group but can't seem to loop correctly. Most of
the examples I've seen here are in Jscript and for some reason I
haven't been able to convert it correctly. Please, if you have any
information or success looping with VBscript please reply. I'm sure
I'll be sharing much data with others as well. Oh, by the way, I wish
I had the 2007 version but I don't. The organazation will not purchase
it at this time, so it looks as if I'm left with no "Navigator" or
other upgraded functionality. Thanks
Paul - 11 Jan 2008 18:47 GMT
> I know there have been many posts regarding the data structure of
> repeating groups and tables but I've searched for countless hours with
[quoted text clipped - 12 lines]
> it at this time, so it looks as if I'm left with no "Navigator" or
> other upgraded functionality. Thanks
Ok... I finally figured it out on my own. If interested take a look
below:
Dim FieldGroup, strFieldA, oStepItem,Sendtest
'This is the group of the repeating section
set FieldGroup = XDocument.DOM.SelectNodes("my:myFields/my:group2/
my:TestGroup")
If FieldGroup.length > 0 Then
Set oStepItem = FieldGroup.Item(0)
i = 0
S = 1
Do Until i = FieldGroup.Length
'Referencing the field(s) to retrieve.
Set strFieldA = XDocument.DOM.SelectSingleNode("my:myFields/my:group2/
my:TestGroup" & "[" & S & "]" & "/my:field5")
Set Sendtest = XDocument.DOM.SelectSingleNode("my:myFields/my:group2/
my:TestGroup" & "[" & S & "]" & "/my:field7")
'Logical Test to return data of node if checkbox(Sendtest) is true.
If Sendtest.text = "True" Then
XDocument.UI.Alert(strFieldA.text)
End If
i = i + 1
S = S + 1
Loop
End If