Help home › The Family Historian API › Function Index › fhGetValueType

functions

fhGetValueType

Description

Returns the type of value that an item can store. Some items, such as record items and items that represent events, do not actually store values of their own. All data associated with them is held by their child items. This function will return an empty string for items that do not store values, or where the pointer selected is null.

See also fhGetDataClass.

Syntax

strItemType = fhGetValueType(ptr)

Parameters

ptr
item pointer

Returns

strItemType
string: For items that do not store values, this string will be empty. For items that store values, the value returned will be one of the following:
text a String
richtext a Rich Text object
date a Date object
integer a number
link an Item Pointer
age an Age object
blob a multimedia object (e.g. a picture, sound or video)

Example

ptri = fhNewItemPtr()
ptri:MoveToFirstRecord('INDI')
ptrBirth = fhGetItemPtr(ptri,"INDI.BIRT.DATE") 
fhMessageBox(fhGetDisplayText(ptrBirth) .. " Type: " .. fhGetValueType(ptrBirth))