Forum

Please or Register to create posts and topics.

Color Coding My Relatives and their Relations

This is the query I presently use to color code my relatives and their relations. The color coding is useful for a number of purposes, including identifying potential candidates for individuals to be weeded out of my database. The documentation is in the file.

Uploaded files:
kevync has reacted to this post.
kevync

Thanks for Sharing --- I was thinking about a way to do this the other day.  The one thing I missing about FTM 2019 is the ability to multi=color people -- very helpful to show what common ancestors there are from.

 

related question.  Is there an issue to create a  group for each color found?   I use  SQL to create the colors on the people I have a couple different versions. But basically I want to create a couple "by Silver" for anyone that has silver color, "by green" for anyone that has green color.   so I do not have to manually refresh the groups for each and every color (15 or so).  I use a color scheme like below CREATE TEMP TABLE xConsangColor(Consanguinity INTEGER Primary Key, ColorID INTEGER, ColorName TEXT)
;
INSERT INTO xConsangColor VALUES (0,0,'black');
INSERT INTO xConsangColor VALUES (1,8,'maroon');
INSERT INTO xConsangColor VALUES (2,10,'navy');
INSERT INTO xConsangColor VALUES (3,9,'green');
INSERT INTO xConsangColor VALUES (4,11,'purple');
INSERT INTO xConsangColor VALUES (5,12,'brown');
INSERT INTO xConsangColor VALUES (6,13,'teal');
INSERT INTO xConsangColor VALUES (7,14,'gray');
INSERT INTO xConsangColor VALUES (8,1,'red');
INSERT INTO xConsangColor VALUES (9,3,'blue');
INSERT INTO xConsangColor VALUES (10,2,'lime');
INSERT INTO xConsangColor VALUES (11,7,'silver');
INSERT INTO xConsangColor VALUES (12,4,'fuchsia');
INSERT INTO xConsangColor VALUES (13,5,'yellow');
INSERT INTO xConsangColor VALUES (14,6,'aqua');

There shouldn't be an issue. Have you looked at the posts under #namedgroup ?

This recent post by @patjones demonstrates using Common Table Expressions in populating groups: Group Queries.

kevync has reacted to this post.
kevync

Thanks I will take a look -- I was not sure what exactly to look for or what is was called

 

Have not  used/written sub-queries before:

If I want to a delete qry (RM8) -- what is wrong with below

--Delete everyone from the group with a particular name (such as 'MyGroup')  what is wrong with this?

DELETE
FROM GroupTable
WHERE GroupID =
(
SELECT TagValue
FROM TagTable
WHERE TagName = 'MyGroup'
)

Looks okay. Should result in an empty group. There is (or was) an issue with adding someone to an empty group but that may not matter if you are using sqlite to populate it.

well actually that would be part 2-- eventually I would add new people .

So INSERT might have issue if rows are empty in table? Have not played with Unique so that might be an option

thanks