Substitution values in charts—code for type of relationship?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Substitution values in charts—code for type of relationship?

In the 5 wiki, I cannot see any substitution code that enables me to
write a different string according to the [existing] types of
relationships other than type = "Married".

The wiki is particularly enigmatic about the function of the key $t, but
in all my testing so far $t[Marriage] gives the value of the
description. If I exactly follow [with no other syntax in the marriage
box field] the example which literally says that "$t[Marriage] (D)" is
equivalent to $M, the result in fact is the contents of the marriage
event description + " (D)".
If I enter just $M, the result is [as expected] the place of marriage.
If I use "$e[Marriage] (d D)" in the expectation of getting date & place
of marriage, I in fact get the string "(d D)". So the wiki looks like it
needs some tweaking by someone who actually understands what the code
can and cannot do.

Can anyone set me straight, or offer a practical workaround?

What I am trying to achieve is to avoid completely blank marriage boxes
[which is the result of {Married $m $M} for couples who have the
relationship types "Unmarried" or "Unknown", in e.g. a Descendant
chart], and instead to conditionally print out something like—

a) IF relationship type = "Married", print {Married $m $M}
b) IF relationship type = "Civil Union", print {Civil Union$m $M}
c) IF relationship type = "Unmarried", print "Unmarried relationship"
d) ELSE [AKA relationship type = "Unknown"], print "Relationship status
& details of date/place unknown"

Adrian Davey

Gramps-users mailing list
[hidden email]