default name of
many name forms of
surname of
given names of
trimmed name of
first birth event of
first death event of
first baptism event of
first burial event of
first father of
first mother of
next (younger) sibling of
previous (older) sibling of
sex of
male predicate
female predicate
pronoun referring to
number of spouses of
number of families (as spouse/parent) of
first parents' family of
first title of
internal key of (work for families also)
SOUNDEX code of
root GEDCOM node of
root GEDCOM node of
find person with key value
first person in database in key order
last person in database in key order
next person in database in key order
previous person in database in key order
spouses (INDI, INDI, FAM, INT) { commands }
loop through all spouses of
families (INDI, FAM, INDI, INT) { commands }
loop through all families (as spouse) of
forindi (INDI, INT) { commands }
loop through all persons in database
These functions take a person as a parameter and return information about him or her.
Name returns the default name of a person; this is the name found on the first 1 NAME line in the person's record; the slashes are removed and the surname is made all capitals; name can take an optional second parameter - if it is true the function acts as described above; if false, the surname is kept exactly as it is in the record.
Fullname returns the name of a person in a variety of formats. If the second parameter is true the surname is shown in upper case; otherwise the surname is as in the record. If the third parameter is true the parts of the name are shown in the order as found in the record; otherwise the surname is given first, followed by a comma, followed by the other name parts. The fourth parameter specifies the maximum length field that can be used to show the name; various conversions occur if it is necessary to shorten the name to fit this length.
Surname returns the surname of the person, as found in the first 1 NAME line; the slashes are removed. Givens returns the given names of the person in the same order and format as found in the first 1 NAME line of the record. Trimname returns the default name of the person trimmed to the maximum character length given in the second variable.
Birth, death, baptism and burial return the first birth, death, baptism and burial event in the person's record, respectively. An event is a level 1 GEDCOM node. If there is no matching event these functions return null.
Father, mother, nextsib and prevsib return the father, mother, next younger sibling and next older sibling of the person, respectively. If the person has more than one father (mother) the father (mother) function returns the first one. These functions return null if there is no person in the role.
Sex returns the person's sex as the string M if the person is male, F if the person is female, or U if the sex of the person is not known. Male and female return true if the person is male or female, respectively, or false if not.
Pn generates pronouns, useful when generating English text; the second parameter selects the type of pronoun:
He/She
he/she
His/Her
his/her
him/her
Nspouses returns the number of spouses the person has in the database, and nfamilies returns the number of families the person is a parent/spouse in; these two values are not necessarily the same. Parents returns the first family that the person is a child in.
Title returns the value of the first 1 TITL line in the record. Key returns the key value of a person or family; it there is a second parameter and it is non-null, the leading I or F will be stripped. Soundex returns the Soundex code of the person.
Root and Inode return the root node of the person's GEDCOM node tree. Note that an INDI value is not a NODE value. If you want to process the nodes within a person node tree, you must first use the root or inode function to get the root of the person node tree. Root and inode are synonyms.
Indi returns the person who's key is passed as an argument; if no person has the key indi returns null.
Firstindi, nextindi and previndi allow you to iterate through all persons in the database. Firstindi returns the first person in the database in key order. Nextindi returns the next person after the argument person in key order. Previndi returns the previous person before the argument person in key order.
Spouses is an iterator that loops through each spouse a person has. The first argument is a person. The second argument is a person variable that iterates through the first person's spouses. The third argument is a family variable that iterates through the families the person and each spouse are in. The fourth argument is an integer variable that counts the iterations.
Families is an iterator that loops through the families a person was a spouse/parent in. The first argument is a person. The second argument is a family variable that iterates through the families the first person was a spouse/parent in. The third argument iterates through the spouses from the families; if there is no spouse in a particular family, the variable is set to null for that iteration. The fourth argument is an integer variable that counts the iterations.
Forindi is an iterator that loops through every person in the database in ascending key order. Its first parameter is a variable that iterates through the persons; its second parameter is an integer counter variable that counts the persons starting at one.