Creating a metafield
Posted: 09 Mar 2021 20:23
I am experiencing a serious case of code blindness.
I have a piece of code and am trying to add a metafield to an existing source like this (p is the pointer to the source):
px = fhGetItemPtr(p,'SOUR.~NM-PERSOON') -- works as expected
xx = fhGetValueAsText(px) -- also ok
pz = fhCreateItem('SOUR.~NM-PERSOON_2', p) -- (null) Why?
bOk = fhSetValueAsText(pz, xx) -- false
What am I missing?
I have a piece of code and am trying to add a metafield to an existing source like this (p is the pointer to the source):
px = fhGetItemPtr(p,'SOUR.~NM-PERSOON') -- works as expected
xx = fhGetValueAsText(px) -- also ok
pz = fhCreateItem('SOUR.~NM-PERSOON_2', p) -- (null) Why?
bOk = fhSetValueAsText(pz, xx) -- false
What am I missing?