functions

fhGetQualifiedRecordId

Description

Returns the record id of the record item as a string, with a prefix character that indicates type.  Qualified record ids are unique across all record types, within a project.

Minimum FH Version

7

Syntax

sRecordId = fhGetQualifiedRecordId(ptr)

Parameters

ptr
Item Pointer: pointer for which the qualified record Id is required. If the pointer is pointing to an item which is not a record (e.g. a child of a record) an empty string will be returned.

Remarks

Record ids in Family Historian are unique within record type.  A qualified record id adds a single letter prefix to the record id, which indicates the record type.  The correct letter prefixes (which are always capitalised) are given by the table below:

Letter Prefix Record Type
H
Header
F
Family
I
Individual
O
Media
N
Note
R
Repository
S
Source
U
Submitter
B
Submission
P
Place
E
Research Note
T
Source template

Returns

sRecordId
string: The qualified record Id for the record.

Example

local ptr = fhNewItemPtr()
ptr:MoveToFirstRecord('INDI')
local sRecordId = fhGetQualifiedRecordId(ptr)
fhMessageBox(fhGetDisplayText(ptr).." [".. sRecordId .. "]")