The sentence and text in the Narrative report is getting truncated:
The sentence template is:
{date} {individual} was listed in the {date:Year} {=TextPart(%FACT.PLAC%,-1)} census as {=TextPart(%FACT.NOTE2%,1)} {place}. In the census {individual's} name was given as {=TextPart(%FACT.NOTE2%,2)}<, age {=TextPart(%FACT.NOTE2%,3)}><, occupation {=TextPart(%FACT.NOTE2%,4)}><, birthplace {=TextPart(%FACT.NOTE2%,5)}>.< {=TextPart(%FACT.NOTE2%,6)}.>< Also living in the household at the time was {other=resident}.>
Here is the (dummy) Note text that drives much of the actual sentence:
hospital staff , Robert Frost , 20 (single) , Private in RAMC (College Domestic Servant) , Thetford Thetford Thetford Thetford Thetford Thetford Thetford Thetford Thetford Norfolk
And here is the actual sentence that appears in the Narrative report:
On 2 April 1911 Robert was listed in the 1911 England census as hospital staff in Royal Victoria Hospital. In the census Robert name was given as Robert Frost, age 20 (single), occupation Private in RAMC (College Domestic Servant), birthplace Thetford Thetford Thetford Thetford Thetford Thetford Thetf....
No matter how I structure the Note text, the sentence always gets truncated with ... at the end.
TIA ... John.
* Sentence is truncated ...
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Sentence is truncated ...
Yes, that is the normal truncation that gets applies to long Note text, when displayed in many situations.
The workaround is to use =GetParagraph(%...NOTE2%,1) which returns an untruncated 1st paragraph.
i.e.
{=TextPart(GetParagraph(%FACT.NOTE2%,1),5)}
See how_to:display_long_text_like_notes|> Display long text such as Notes.
The workaround is to use =GetParagraph(%...NOTE2%,1) which returns an untruncated 1st paragraph.
i.e.
{=TextPart(GetParagraph(%FACT.NOTE2%,1),5)}
See how_to:display_long_text_like_notes|> Display long text such as Notes.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Sentence is truncated ...
Thanks (again) Mike.
It seems truncation occurs when the function call =TextPart(%FACT.NOTE2%,nn) returns more than 60 characters. A somewhat small limit imho.
Cheers ... John.
It seems truncation occurs when the function call =TextPart(%FACT.NOTE2%,nn) returns more than 60 characters. A somewhat small limit imho.
Cheers ... John.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Sentence is truncated ...
It is not =TextPart() that is performing the truncation, but the %FACT.NOTE2% Data Ref, but until the 5th part is reached it does not matter, and in your example there will be no 6th or 7th part.
i.e. The truncated text returned by %FACT.NOTE2% is always about 150 chars:
hospital staff , Robert Frost , 20 (single) , Private in RAMC (College Domestic Servant) , Thetford Thetford Thetford Thetford Thetford Thetf...
So strictly speaking you need to use GetParagraph(%FACT.NOTE2%,1) in every =TextPart() just in case even the first value is more than 150 chars.
Having seen what you are developing, I have some other ideas you might want to explore.
(1) =GetLabelledText()
A drawback of =TextPart() is the numbers are not meaningful, and great care must be taken with the comma separated Note, especially if values are blank.
=GetLabelledText() offers a neater alternative and avoids the truncation problem.
The Note would look something like:
Role: hospital staff
Name: Robert Frost
Aged: 20 (single)
Occu: Private in RAMC (College Domestic Servant)
Born: Thetford Thetford Thetford Thetford Thetford
Note: Etc
Each value would be accessed using {=GetLabelledText(%FACT.NOTE2%,"Role:")} where each label (Name:, Aged:, etc) would be applied in turn.
The advantages are the labels are more transparent, the Note is more readable, the labels can be in any order, missing values can be omitted, extra labels can be added without upsetting the layout.
(2) Use Source Transcript
If you can get your head around the above idea, then try this.
Normal practice creates a Source record for the Census cited by the Census Event.
The Text From Source field is usually a transcript that includes all the details you are using above, but in a tabulated grid with a row/paragraph for each person and a column for each value.
The Data Ref would be %FACT.SOUR>TEXT% and each row/paragraph could be 'labelled' with say the associated Record Id.
Then somethig like the following should work:
{=TextPart(GetLabelledText(%INDI.CENS.SOUR>TEXT%,Text(Text(RecordId()) . ":")),2)}
Where the Text From Source field would look like:
29: Robert Frost, hospital staff, 20 (single), Private in RAMC, Thetford
32: Jefferson Smith, worker, 29 (single), , London
Which is very similar to what Ancesral Sources will create semi-automatically.
i.e. The truncated text returned by %FACT.NOTE2% is always about 150 chars:
hospital staff , Robert Frost , 20 (single) , Private in RAMC (College Domestic Servant) , Thetford Thetford Thetford Thetford Thetford Thetf...
So strictly speaking you need to use GetParagraph(%FACT.NOTE2%,1) in every =TextPart() just in case even the first value is more than 150 chars.
Having seen what you are developing, I have some other ideas you might want to explore.
(1) =GetLabelledText()
A drawback of =TextPart() is the numbers are not meaningful, and great care must be taken with the comma separated Note, especially if values are blank.
=GetLabelledText() offers a neater alternative and avoids the truncation problem.
The Note would look something like:
Role: hospital staff
Name: Robert Frost
Aged: 20 (single)
Occu: Private in RAMC (College Domestic Servant)
Born: Thetford Thetford Thetford Thetford Thetford
Note: Etc
Each value would be accessed using {=GetLabelledText(%FACT.NOTE2%,"Role:")} where each label (Name:, Aged:, etc) would be applied in turn.
The advantages are the labels are more transparent, the Note is more readable, the labels can be in any order, missing values can be omitted, extra labels can be added without upsetting the layout.
(2) Use Source Transcript
If you can get your head around the above idea, then try this.
Normal practice creates a Source record for the Census cited by the Census Event.
The Text From Source field is usually a transcript that includes all the details you are using above, but in a tabulated grid with a row/paragraph for each person and a column for each value.
The Data Ref would be %FACT.SOUR>TEXT% and each row/paragraph could be 'labelled' with say the associated Record Id.
Then somethig like the following should work:
{=TextPart(GetLabelledText(%INDI.CENS.SOUR>TEXT%,Text(Text(RecordId()) . ":")),2)}
Where the Text From Source field would look like:
29: Robert Frost, hospital staff, 20 (single), Private in RAMC, Thetford
32: Jefferson Smith, worker, 29 (single), , London
Which is very similar to what Ancesral Sources will create semi-automatically.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Sentence is truncated ...
Hi Mike - thanks for those really great suggestions.
I plan to play around with AS and see if I can get it to do what I'm after. If I continue with a role-your-own fact then I will definitely use your =GetLabelledText approach - brilliant !
Cheers ... John.
I plan to play around with AS and see if I can get it to do what I'm after. If I continue with a role-your-own fact then I will definitely use your =GetLabelledText approach - brilliant !
Cheers ... John.