functions
fhSetValueAsText
Description
Sets the pointers item to a text value.
Syntax
bOK = fhSetValueAsText(ptr, strText)
Parameters
- ptr
- item pointer
- strText
- string: value to use
Returns
- bOK
- boolean: returns true on success and false on failure
Example
Creates a new individual record and sets the name to 'Fred Bloggs' and the sex to Male.
ptrInd = fhCreateItem("INDI") -- create an Individual record and ret ptr to it ptrName = fhCreateItem("NAME", ptrInd) -- create a NAME field within this record, and ret ptr to it fhSetValueAsText(ptrName, 'Fred Bloggs') -- set value of the name using passed in parameter ptrSex = fhCreateItem("SEX", ptrInd) -- create a SEX field within this record, and ret ptr to it fhSetValueAsText(ptrSex, 'Male')