My starting point is the code snippet AllItems.fh_Lua
The Fact in question is Marriage Witness and I wanted to move the text from the note field to the main field. This I have achieved OK using this code.
Code: Select all
for ptr in allItems('_ATTR-MARRIAGE_WITNESS.NOTE2','FAM') do
if strVal ~= '' then
thisptr = fhGetItemPtr(ptr,'_ATTR-MARRIAGE_WITNESS')
thisptr = fhGetItemPtr(ptr,'_ATTR-MARRIAGE_WITNESS.NOTE2')
Th other thing I would like to do is copy the Marriage Date (%FAM.MARR.DATE%) to (%FAM._ATTR-MARRIAGE_WITNESS.DATE%)
I am guessing dates are handled a little different to text fields so I am struggling.
All help appreciated.