first marriage event of
first husband/father of
first wife/mother of
number of children in
first child of
last child of
internal key of (works for persons also)
root GEDCOM node of
root GEDCOM node of
find family from key
first family in database in key order
last family in database in key order
next family in database in key order
previous family in database in key order
children (FAM, INDI_V, INT_V) { commands }
loop through children of family
forfam (FAM_V, INT_V) { commands }
loop through all families in database
These functions take a family as an argument and return information about it.
Marriage returns the first marriage event found in the family record, if any; it returns null if there is no marriage event.
Husband returns the first husband/father of the family, if any; and wife returns the first wife/mother of the family, if any. Each returns null if the requested person is not in the family.
Nchildren returns the number of children in the family.
Firstchild and lastchild return the first child and last child in a family, respectively.
Key was described in the section on person functions.
Root and fnode return the root node of a family GEDCOM node tree. Note that a FAM value is not a NODE value. If you want to process the nodes within a family node tree, you must first use root or fnode function to get the root of the family node tree. Root and fnode are synonyms.
Fam returns the family who's key is passed as an argument; if no family has the key fam returns null.
Firstfam, nextfam and prevfam allow you to iterate through all families in the database. Firstfam returns the first family in the database in key order. Nextfam returns the next family after the argument family in key order. Prevfam returns the previous family before the argument family in key order.
Children is an iterator that loops through the children in a family. Its first parameter is a family expression; its second parameter is a variable that iterates through each child; its third parameter is an integer counter variable that counts the children starting at one. These two variables may be used within the loop body.
Forfam is an iterator that loops through every family in the database in ascending key order. Its first parameter is a variable that iterates through the families; its second parameter is an integer counter variable that counts the families starting at one.