Item Pointer

MoveRecordById

Description

Moves this pointer to the record of the type and ID supplied. If a record with the selected ID is not found, this pointer will be set to Null pointer.

Syntax

ptr:MoveToRecordById(sRecordTag, iRecordId)

Parameters

sRecordTag
string: Record Level Tag
iRecordId
integer: record id number for an existing record.

Returns

none

Remarks

This method is particularly useful, if importing from external files which have record IDs in them.

Example

ptrIndi = fhNewItemPtr()
ptrIndi:MoveToRecordById('INDI',12)
if ptrIndi:IsNotNull() then
    fhMessageBox(fhGetDisplayText(ptrIndi))
else
    fhMessageBox('Record 12 not found')
end