Here's a snippet of code:
Code: Select all
local pSource = pCite.source
local pRepository = SetRepository(pSource, tblFields["RP-Repository"].Value)
local sTag = "~.~RP-Repository"
local ptrItem = fhGetItemPtr(pSource, sTag)
if ptrItem:IsNull() then
ptrItem = fhCreateItem(sTag, pSource)
end
if ptrItem:IsNotNull() then
fhSetValueAsLink(ptrItem, pRepository)
end
pRepository points to the repository record (stepped through in debugger and verified)
pSource points to the source record
sTag is the specification for the repository field (in my case - RP-Repository)
The call to fhGetItemPtr(pSource, sTag) returns NULL, as does the subsequent call to fhCreateItem(sTag, pSource).
What am I doing wrong?