Item Pointer

MovePrev

Description

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.

Syntax

ptr:MovePrev([strTag])

Parameters

strTag (optional)
"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

Return Value

None
 

NB: If no sibling is found the pointer will be set to Null.

Remarks

Example - Moves to the Birth Field and then reads the previous field.
pi = fhNewItemPtr()
pi:MoveToFirstRecord('INDI')
piField = fhNewItemPtr()
piField:MoveTo(pi,"~.BIRT")
while not piField:IsNull() do
   fhMessageBox("field = " .. fhGetDisplayText(piField))   
   piField:MovePrev()
end