* Expression - is it possible to get son of / daughter of
- dewilkinson
- Superstar
- Posts: 280
- Joined: 04 Nov 2016 19:05
- Family Historian: V7
- Location: Oundle, Northamptonshire, England
- Contact:
Expression - is it possible to get son of / daughter of
In a sentence I am able to produce "...of John Starling Butcher and Eleanor Durrell Norman" with the expression {%CUR_PRIN.FAMC[1]>%} , but I cannot seem to find how to get son of... / daughter of ..... Is that possible?
David Wilkinson researching Bowtle, Butcher, Edwards, Gillingham, Overett, Ransome, Simpson, and Wilkinson in East Anglia
Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them
Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Expression - is it possible to get son of / daughter of
Use {=CombineText( Sex(%CUR_PRIN%," son"," daughter"," ?"), %CUR_PRIN.FAMC>%, "")}
This only produces text if %CUR_PRIN.FAMC>% exists, i.e. there are parents.
The 1st parameter is a prefix and the 3rd parameter is a suffix (in case blank).
The prefix Sex(%CUR_PRIN%," son"," daughter"," ?") produces text according to Sex of Individual.
That will produce son...of John Starling Butcher and Eleanor Durrell Norman etc.
But I suspect you will want to get rid of the elipsis (...)?
So you will need:
{=CombineText(Sex(%CUR_PRIN%," son of "," daughter of "," ? of "), TextIf( Exists(%CUR_PRIN.FAMC%), Text( CombineText(,%CUR_PRIN.~FATH>%,,"unknown father") . " and " . CombineText(,%CUR_PRIN.~MOTH>%,,"unknown mother")),""),"",)}
This only produces text if %CUR_PRIN.FAMC>% exists, i.e. there are parents.
The 1st parameter is a prefix and the 3rd parameter is a suffix (in case blank).
The prefix Sex(%CUR_PRIN%," son"," daughter"," ?") produces text according to Sex of Individual.
That will produce son...of John Starling Butcher and Eleanor Durrell Norman etc.
But I suspect you will want to get rid of the elipsis (...)?
So you will need:
{=CombineText(Sex(%CUR_PRIN%," son of "," daughter of "," ? of "), TextIf( Exists(%CUR_PRIN.FAMC%), Text( CombineText(,%CUR_PRIN.~FATH>%,,"unknown father") . " and " . CombineText(,%CUR_PRIN.~MOTH>%,,"unknown mother")),""),"",)}
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- dewilkinson
- Superstar
- Posts: 280
- Joined: 04 Nov 2016 19:05
- Family Historian: V7
- Location: Oundle, Northamptonshire, England
- Contact:
Re: Expression - is it possible to get son of / daughter of
Mike,
Thank you, that works a treat. My next hurdle is to do the same in a marriage sentence and pick up the spouses parents, is that possible?
Thank you, that works a treat. My next hurdle is to do the same in a marriage sentence and pick up the spouses parents, is that possible?
David Wilkinson researching Bowtle, Butcher, Edwards, Gillingham, Overett, Ransome, Simpson, and Wilkinson in East Anglia
Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them
Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Expression - is it possible to get son of / daughter of
Yes, the expression is exactly the same for the husband, and for the wife simply replace each CUR_PRIN with CUR_PRIN2.
i.e. Current Principal and Current Principal 2
Keep the Sex(...) functions to cater for same sex partnerships.
i.e. Current Principal and Current Principal 2
Keep the Sex(...) functions to cater for same sex partnerships.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- dewilkinson
- Superstar
- Posts: 280
- Joined: 04 Nov 2016 19:05
- Family Historian: V7
- Location: Oundle, Northamptonshire, England
- Contact:
Re: Expression - is it possible to get son of / daughter of
Mike,
I did wonder if it was as simple as that.
Thank you very much for your help, I can begin to see how expressions work now.
I did wonder if it was as simple as that.
Thank you very much for your help, I can begin to see how expressions work now.
David Wilkinson researching Bowtle, Butcher, Edwards, Gillingham, Overett, Ransome, Simpson, and Wilkinson in East Anglia
Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them
Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Expression - is it possible to get son of / daughter of
Now you are getting to understand them, did you find how_to:understanding_expressions|> Understanding Expressions a useful starting point, bearing in mind its cross-references to the FH Help on Advanced Topics and to Data References and Functions?
Are there ways it could be improved?
Remember, it appears you have only been using FH for less than a month ! ! !
At this rate you will soon be an expert.
Are there ways it could be improved?
Remember, it appears you have only been using FH for less than a month ! ! !
At this rate you will soon be an expert.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- dewilkinson
- Superstar
- Posts: 280
- Joined: 04 Nov 2016 19:05
- Family Historian: V7
- Location: Oundle, Northamptonshire, England
- Contact:
Re: Expression - is it possible to get son of / daughter of
Mike,
I wouldn't quite say that, but I have many years of programming experience in many languages and in database design and management.
I did look at Expressions in the Knowledge Base and have set up a few already. I thought this more difficult expression must be possible, and had a go, but the difficulty with all things like this is understanding the protocols and syntax. I didn't think Prin2 would apply in both directions in a marriage, but it does. This tells me this expression system is incredibly powerful and seemingly little is impossible. it is just knowing how.
I really look forward to exploring this aspect further and making use of the capabilities. Coming from TMG this capability makes a huge advance.
I wouldn't quite say that, but I have many years of programming experience in many languages and in database design and management.
I did look at Expressions in the Knowledge Base and have set up a few already. I thought this more difficult expression must be possible, and had a go, but the difficulty with all things like this is understanding the protocols and syntax. I didn't think Prin2 would apply in both directions in a marriage, but it does. This tells me this expression system is incredibly powerful and seemingly little is impossible. it is just knowing how.
I really look forward to exploring this aspect further and making use of the capabilities. Coming from TMG this capability makes a huge advance.
David Wilkinson researching Bowtle, Butcher, Edwards, Gillingham, Overett, Ransome, Simpson, and Wilkinson in East Anglia
Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them
Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Expression - is it possible to get son of / daughter of
This expression has been tried in Translate Narrative Reports to Spanish with Fact Sentence Templates (17792) but failed.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry