MoveNext provides a method to move to the a sibling of the data item pointed to. It can either move to the next sibling of the item ("ANY")which matches the current tag or to any tag at the same level.
ptr:MoveNext([strTag])
| "ANY" | (Default) Moves to the next sibling regardless of tag |
|---|---|
| "SAME_TAG" | Moves to the next sibling with a matching tag to the current pointer value |
NB: If no sibling is found the pointer will be set to Null.
pi = fhNewItemPtr() pi:MoveToFirstRecord('INDI') piName = fhNewItemPtr() piName:MoveTo(pi,'~.NAME') while not piName:IsNull() do fhMessageBox("Name = " .. fhGetDisplayText(piName)) piName:MoveNext("SAME_TAG") end