Multiple Field Codes and Separators
Posted: 27 Mar 2023 14:45
I have been using FH for just over a year after importing from TMG. I have spent most of this time adding more data and reorganising the information I already had. I am now starting to work on reports and sentence construction where I am running into a few problems. I have had a search on this and had a look at the Calico help topics but I am still having a problem with angle brackets and multiple codes.
I have a 'CensusUK' fact imported from TMG and I wish to add the occupation of a witness into their fact sentence in their various roles e.g. wife. Following the example in the help file I have added the following to the witness note:
Occupation:a Dressmaker
Using the sentence:
{%CUR~WITN>NAME:FIRST%}'s occupation was given as {=GetLabelledText(%CUR~WITN.NOTE2%, "Occupation:")}
crrectly generates a sentence of:
Eleanor's occupation was given as a Dressmaker.
However, if the individual does not have an occupation then, obviously, the sentence should not appear thus I enclosed it in angle brackets i.e:
<{%CUR~WITN>NAME:FIRST%}'s occupation was given as {=GetLabelledText(%CUR~WITN.NOTE2%, "Occupation:")}>
In the case of Eleanor this now results in a sentence:
Eleanor's occupation was given as {=GetLabelledText(%CUR~WITN.NOTE2%, "Occupation:")}
If I change the sentence to:
<Their occupation was given as {=GetLabelledText(%CUR~WITN.NOTE2%, "Occupation:")}>
results in:
Their occupation was given as a Dressmaker.
However, it is not very elegant.
This is quite a long post for what I am sure is a simple solution to the problem but it is one that evades me. This is just one example of problems I am having with multiple codes within angled brackets and I would appreciate any help.
thanks,
Mac.
I have a 'CensusUK' fact imported from TMG and I wish to add the occupation of a witness into their fact sentence in their various roles e.g. wife. Following the example in the help file I have added the following to the witness note:
Occupation:a Dressmaker
Using the sentence:
{%CUR~WITN>NAME:FIRST%}'s occupation was given as {=GetLabelledText(%CUR~WITN.NOTE2%, "Occupation:")}
crrectly generates a sentence of:
Eleanor's occupation was given as a Dressmaker.
However, if the individual does not have an occupation then, obviously, the sentence should not appear thus I enclosed it in angle brackets i.e:
<{%CUR~WITN>NAME:FIRST%}'s occupation was given as {=GetLabelledText(%CUR~WITN.NOTE2%, "Occupation:")}>
In the case of Eleanor this now results in a sentence:
Eleanor's occupation was given as {=GetLabelledText(%CUR~WITN.NOTE2%, "Occupation:")}
If I change the sentence to:
<Their occupation was given as {=GetLabelledText(%CUR~WITN.NOTE2%, "Occupation:")}>
results in:
Their occupation was given as a Dressmaker.
However, it is not very elegant.
This is quite a long post for what I am sure is a simple solution to the problem but it is one that evades me. This is just one example of problems I am having with multiple codes within angled brackets and I would appreciate any help.
thanks,
Mac.