Hi,
I've created a modified 'Descendants' custom query with few additional fields. All is working fine and dandy, and for a specific individual from the tree I can easily create a list of all his/her descendants, with spouses. This is superb OK.
Now, I want to include the name of specified individual (for whom is the descendants tree created), in every record, in a field called 'from'. How to do this? I know that this information will repeat in evey line, but that is desired. All data will be further exported and processed, and this 'root' field is necessary. Any hint, please?
* custom query with tree root name in every record
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: custom query with tree root name in every record
Welcome to the FHUG.
I assume you still use the prompt for Starting Person.
So set the Expression to =Individual(["Starting Person"])
or to =GetField(Individual(["Starting Person"]),"%INDI.NAME%") to explicitly show name.
I assume you still use the prompt for Starting Person.
So set the Expression to =Individual(["Starting Person"])
or to =GetField(Individual(["Starting Person"]),"%INDI.NAME%") to explicitly show name.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: custom query with tree root name in every record
Hey! Thank you for the quick answer. Indeed, it works! Awesome.
However, I've changed this function to my needs, using the formula:
=ToLower(GetField(Individual(["Starting Person"]),"%INDI.NAME:FIRST%"))
Simply, only firstname in lowercase is needed. However, the full name (firstname and surname) appeared in the whole column. Hmmm, maybe I can cut the text out using first space as a delimiter? However, maybe there is some simpler method, but my idea of putting NAME:FIRST seemingly is not working. Could you be so nice and drop me some clues?
However, I've changed this function to my needs, using the formula:
=ToLower(GetField(Individual(["Starting Person"]),"%INDI.NAME:FIRST%"))
Simply, only firstname in lowercase is needed. However, the full name (firstname and surname) appeared in the whole column. Hmmm, maybe I can cut the text out using first space as a delimiter? However, maybe there is some simpler method, but my idea of putting NAME:FIRST seemingly is not working. Could you be so nice and drop me some clues?
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: custom query with tree root name in every record
Yes, the following expression will do that:
=ToLower(FieldText(Individual(["Starting Person"]),'INDI.NAME:FIRST'))
There is a series of functions Field(...) and FieldText(...) and GetField(...) and GetFieldText(...) that each have slightly different capabilities, but the more complex ones take longer to execute, so could slow down a very large Query.
It is a matter of choosing the best one for the task required.
=ToLower(FieldText(Individual(["Starting Person"]),'INDI.NAME:FIRST'))
There is a series of functions Field(...) and FieldText(...) and GetField(...) and GetFieldText(...) that each have slightly different capabilities, but the more complex ones take longer to execute, so could slow down a very large Query.
It is a matter of choosing the best one for the task required.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: custom query with tree root name in every record
Thank you, I'll look for those functions. Right now my problem was solved, I'm very happy!