Sets the value of an item to a record link. Is primarily used with data items that are links, but from version 6.0.3 onwards it can also be used with place fields, to link a place field to a Place record (see Special Issues with Place Fields for more details). If you wish to use fhSetValueAsLink to set the value of a Place field, you must use fhInitialise to ensure that the version is 6.0.3 or later.
bOK = fhSetValueAsLink(ptr, ptrLink)
Taken from the Create Family Sample.
ptrFam = fhCreateItem("FAM") -- now create the family record ptrLink = fhCreateItem("HUSB", ptrFam ) -- create a HUSB field in the family record fhSetValueAsLink(ptrLink, ptrDad) -- and link dad into it