Re: Reference a section of place

Leslie P

This may or may not be of use in your situation Edward, but when I decided to get "fancy" with my Occupation Attribute sentence, it took a LOT of trial and error. I got there in the end, with something that looks hairy as heck, and there may be an easier way to do it, but perhaps this will give you some ideas.

Like I said, it's the occupation attribute, so I put things like "farmer" or "store owner" or "teacher" in the attribute field. I want to keep that as simple as possible so I can easily see and count how many farmers I have, or teachers or whatever.

I do not use Addresses at all, I only use the place field to define the place that an event happened, and I keep the places all very well divided up - detail, city, county, state, country - so the 5th place item from the end will always be the name of the company, if it exists.

The sentence I want is:

no place: In 1975 Mack was a lobbyist.
no place detail: From 1933 to 1950 Homer was a farmer in Follett, Lipscomb, Texas, United States
with place detail: Katie was a teacher at Follett High School in Follett, Lipscomb, Texas, United States

The code that finally allowed me to get this is: 
{date} {individual} was {a/an value} {=ExistsText(%FACT.PLAC%, CombineText( "at ", TextPart( %FACT.PLAC%, -5), Text(" in ".TextPart(%FACT.PLAC%,-4) .", ". TextPart(%FACT.PLAC%,-3) . ", ". TextPart(%FACT.PLAC%,-2) .", ". TextPart(%FACT.PLAC%,-1))  ,Text("in ".%FACT.PLAC%)))}.

Like I said, it took ages to get this right, but this combination of TextPart, CombineText, and ExistsText seems to work to get what I want.
Hope this helps.
Leslie P
Houston, TX
user of: Zotero, RootsMagic, Family Historian, TNG, IMatch, ZenPhoto

Join to automatically receive all group messages.