%include;perso_utils
%include;menubar
%define;title(xxx)
[*xxx]
[*select person to compute relationship] |
%end;
%reset_count;
%if;(evar.v1=1 and evar.v2=1)
%apply;title("siblings")
%if;(has_parents)
%let;my_father;%self.father;%in;
%let;my_mother;%self.mother;%in;
%let;my_first_name_key;%first_name_key;%in;
%let;my_surname_key;%surname_key;%in;
%if;father.has_children;
%foreach;father.family;
%if;(has_children and father.spouse = my_mother)
- From %father; and %father.spouse;
%end;
%end;
%foreach;father.family;
%if;(has_children and father.spouse != my_mother)
- From %father; and %father.spouse;
%foreach;child;
%incr_count;
-
%child;
%end;
%end;
%end;
%end;
%if;mother.has_children;
%foreach;mother.family;
%if;(has_children and mother.spouse != my_father)
- From %mother; and %mother.spouse;
%foreach;child;
%incr_count;
-
%child;
%end;
%end;
%end;
%end;
%end;
%elseif;(evar.v1=0)
%if;(evar.v2=0 or evar.v2="")
%apply;title("self")
%self;
%else;
%if;(evar.v2=1)%apply;title("children")
%elseif;(evar.v2=2)%apply;title("grandchildren")
%elseif;(evar.v2=3)%apply;title("great-grandchildren")
%elseif;(evar.v2=4)%apply;title("great-great-grandchildren")
%else;
%let;lev_dn;%evar.v2; generations below%in
%apply;title(lev_dn)
%end;
descendants: tbd
%end;
%elseif;(evar.v2=0)
%if;(evar.v1=1)%apply;title("parents")
%elseif;(evar.v1=2)%apply;title("grandparents")
%elseif;(evar.v1=3)%apply;title("great-grandparents")
%elseif;(evar.v1=4)%apply;title("great-great-grandparents")
%else;
%let;lev_up;%evar.v1; generations above%in
%apply;title(lev_up)
%end;
ascendants: tbd
%else;
Should not happen!!
%end;
Total[:] %count; %if;(count=1)[person/persons]0%else;[person/persons]1%end;.
%include;trl
%include;copyr
%include;js