Returns the immediate 'parent' data item of a given data item.
The following example gets the parent item of a data item that holds a witness's role. The parent item is a link to the Witness record.
=GetParentItem(GetRole(%INDI%,"CENS[1881]"))
It is possible to use the GetLinkedItem function to access the linked item - like this:
=GetLinkedItem(GetParentItem(GetRole(%INDI%,"CENS[1881]")))
However, this it not very useful, as it merely take you back to the starting person - i.e. %INDI% in this case. The following example is more useful, however. It also builds on the first example, but this time to retrieve the Witness note (if any):=GetField(GetParentItem(GetRole(%INDI%,"CENS[year=1841]")),"%~.NOTE2%")