I am trying to create a chart that will show all the people who have a genetically transferred disease.
So far I have been able to create a new fact and add that fact to each person who shows this disease. I have also manually set a new flag for each of these people.
On the chart I show the note for that new genetic fact. I have also set the background color for each person with the disease ( the new flag) to a unique color. All is good and shows what I want.
I would like to know if there is any way to set that new flag based on the presence of that genetic disease fact type automatically? It appears that a plugin might do the job but I have not seen a plugin that will do this in particular. I am new to FH and I have not written any plugins and was wondering if anyone has attempted this and could offer some advice on if a plugin exists and if not how I would go about writing one?
* set flag based on fact
-
TMG_refugee
- Diamond
- Posts: 97
- Joined: 14 Nov 2015 15:44
- Family Historian: V7
- johnmorrisoniom
- Megastar
- Posts: 882
- Joined: 18 Dec 2008 07:40
- Family Historian: V7
- Location: Isle of Man
Re: set flag based on fact
You don't need to add the flag at all.
Because you are adding a fact about the disease, the diagram options can be set to test for the existence of the fact itself, and set the background colour accordingly (Or add an Icon).
In the boxes section of Diagram Options select add condition
add an expression to check your fact exists (My expression tests for a ToDo Fact) substitute the code for your fact using the insert data ref button and click OK
Choose what feature you want to use
Because you are adding a fact about the disease, the diagram options can be set to test for the existence of the fact itself, and set the background colour accordingly (Or add an Icon).
In the boxes section of Diagram Options select add condition
add an expression to check your fact exists
Code: Select all
=Exists(%INDI._ATTR-TO_DO%)Choose what feature you want to use
- tatewise
- Megastar
- Posts: 27082
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: set flag based on fact
For background advice see how_to:using_flags_and_icons_and_expressions|> Using Flags and Icons and Expressions.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
TMG_refugee
- Diamond
- Posts: 97
- Joined: 14 Nov 2015 15:44
- Family Historian: V7
Re: set flag based on fact
John,
Thank you that worked perfectly.
Thank you that worked perfectly.