MovePrev provides a method to move to a subsequent sibling of the data item pointed to. It can either move to the previous sibling of the item ("ANY")which matches the current tag or to any tag at the same level.
ptr:MovePrev([strTag])
| "ANY" | (Default) Moves to the previous sibling regardless of tag |
|---|---|
| "SAME_TAG" | Moves to the previous 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') piField = fhNewItemPtr() piField:MoveTo(pi,"~.BIRT") while not piField:IsNull() do fhMessageBox("field = " .. fhGetDisplayText(piField)) piField:MovePrev() end