although it is not clear here at this point in the code, I will take in either an INDI ptr, or a SOUR ptr.
trivial to figure out which, can do that with fhGetTAG. INDI ptr needs to find out if a SOUR exists in the record, and then operate on it, if the argument of the parm is source its already linked, straightforward what to do.
perhaps I am using the wrong modifiers here or the wrong functions.
Read this INDI record and this INDI record only
find my source record
return pointer to it as LINK.
I dont quite know, return an fhNewItemPtr, so the table indexes are filled out?
Please god, make it stop!!!
Code: Select all
local thisPTR = iptr:Clone() -- Basing Pointer to INDI
local ptrSRC = fhNewItemPtr()
local ptrLBL = fhNewItemPtr()
local ptrLink = fhNewItemPtr()
local ptrWork = fhNewItemPtr()
local WebPage = ''
local MML = ''
local DupMML = ''
local WebDup = ''
local CemAddr = ''
local TAG = '~'
local rmn = ''
local txtlen = ''
local function facts()
while thisPTR and ptrLBL:IsNotNull() do
ptrLink = fhGetValueAsLink(ptrLBL) -- cast to same type
if fhGetTag(ptrLBL) == pType then
if ptrLink:IsSame(ptrSOUR) then
ptrWork:MoveToParentItem(ptrSRC) -- Basing Pointer to SOUR
ptrLBL:MoveNextSpecial() --set to next TAG
end -- fn facts