Functions (all)

GetParentItem

Function Name:
GetParentItem
Description:

Returns the immediate 'parent' data item of a given data item.

Minimum FH Version:
7.0
No. of Parameters:
1
Return Type:
A reference to a data item (or NULL if none is found).
Parameter 1:
A reference to a data item.
Examples:

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%")