* DNABloodRelation expression
DNABloodRelation expression
Hi
I hope this is ok, as new here.
I am trying to use the new DNABloodRelation expression ( =DnaBloodRelation(%CUR_TREE_ROOT%,%INDI%) ) to show the blood icon for all blood relatives of an individual.
The built in expression works well but displays for the individual on whom the diagram is built, but I would like to lock this to a single individual. I have tried using the =Hasflag(,["flag"] ) is true using the focus flag for the individual, but whatever I try I get an error Expession is invalid.
Is it possible to do what I am trying to do? Any help appreciated.
Thanks
I hope this is ok, as new here.
I am trying to use the new DNABloodRelation expression ( =DnaBloodRelation(%CUR_TREE_ROOT%,%INDI%) ) to show the blood icon for all blood relatives of an individual.
The built in expression works well but displays for the individual on whom the diagram is built, but I would like to lock this to a single individual. I have tried using the =Hasflag(,["flag"] ) is true using the focus flag for the individual, but whatever I try I get an error Expession is invalid.
Is it possible to do what I am trying to do? Any help appreciated.
Thanks
- tatewise
- Megastar
- Posts: 27087
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: DNABloodRelation expression
Do you mean you want to use somebody other than the %CUR_TREE_ROOT%?
You can use =FileRoot() which relates to whoever is the current File Root person.
i.e. The person in focus in the Focus Window when you click the Home button.
You can use a specific Record Id where =Record( 99, "I" ) is the Individual with Record Id = 99.
BTW: When choosing parameters for a function it is important to get their data type correct.
All the above alternatives provide an Individual record reference which is what the DNABloodRelation requires:
Parameter 1: A reference to an Individual record.
Whereas, =HasFlag(...) returns a Boolean true or false which is the wrong data type.
You can use =FileRoot() which relates to whoever is the current File Root person.
i.e. The person in focus in the Focus Window when you click the Home button.
You can use a specific Record Id where =Record( 99, "I" ) is the Individual with Record Id = 99.
BTW: When choosing parameters for a function it is important to get their data type correct.
All the above alternatives provide an Individual record reference which is what the DNABloodRelation requires:
Parameter 1: A reference to an Individual record.
Whereas, =HasFlag(...) returns a Boolean true or false which is the wrong data type.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: DNABloodRelation expression
Thanks
I have tried =DnaBloodRelation(=Record (1 "I"),%INDI%) but that gives error message each time, but the FileRoot method works fine.
That is a great help but I was hoping to do it for 2 individuals, so I assumed that using the record ID I could add 2 expresssions one for each person. So if you can see what I am doing wrong on that one it would help.
Thanks for help so far, greatly appreciated
I have tried =DnaBloodRelation(=Record (1 "I"),%INDI%) but that gives error message each time, but the FileRoot method works fine.
That is a great help but I was hoping to do it for 2 individuals, so I assumed that using the record ID I could add 2 expresssions one for each person. So if you can see what I am doing wrong on that one it would help.
Thanks for help so far, greatly appreciated
- tatewise
- Megastar
- Posts: 27087
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: DNABloodRelation expression
When using a function as a parameter you must omit its leading = sign as you must have done with FileRoot().
You also forgot the comma between 1 and "I" parameters.
=DnaBloodRelation( Record( 1 , "I" ), %INDI% )
It is a pity that FH does not provide a basic syntax check feedback report.
You also forgot the comma between 1 and "I" parameters.
=DnaBloodRelation( Record( 1 , "I" ), %INDI% )
It is a pity that FH does not provide a basic syntax check feedback report.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: DNABloodRelation expression
Excellent, thanks ever so much.
Paul
Paul
Re: DNABloodRelation expression
Mike
I am just playing with this in the text scheme. The default is
=Text(FormatFloat(DnaRelatedness(%CUR_DGM_ROOT%,%INDI%) * Float(100),2,16) . "% atDNA")
But as we did above I want it to be locked to myself as an Individual and not the current root, so I have tried
=Text(FormatFloat(DnaRelatedness(Record(1,”I”),%INDI%) * Float(100),2,16) . "% atDNA")
but this is rejected each time.
Can you see where I am going wrong or will this not work as I am hoping.
Regards
I am just playing with this in the text scheme. The default is
=Text(FormatFloat(DnaRelatedness(%CUR_DGM_ROOT%,%INDI%) * Float(100),2,16) . "% atDNA")
But as we did above I want it to be locked to myself as an Individual and not the current root, so I have tried
=Text(FormatFloat(DnaRelatedness(Record(1,”I”),%INDI%) * Float(100),2,16) . "% atDNA")
but this is rejected each time.
Can you see where I am going wrong or will this not work as I am hoping.
Regards
- tatewise
- Megastar
- Posts: 27087
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: DNABloodRelation expression
It seems to work for me as long as the quotes are simple quotes and not smart quotes.
If you look closely your quotes are different from the ones in the earlier posting.
Did you compose the expression in a word-processor that typically use smart quotes?
In the Text Scheme Template expression delete the quotes and enter them again from the keyboard.
If you look closely your quotes are different from the ones in the earlier posting.
Did you compose the expression in a word-processor that typically use smart quotes?
In the Text Scheme Template expression delete the quotes and enter them again from the keyboard.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: DNABloodRelation expression
Yes working now, another lesson learnt.
Thanks
Paul
Thanks
Paul