I have a query that includes spouse details via %INDI.~SPOU>NAME%
If %INDI% is a woman, the result is correct: her (first) husband's name. But if %INDI% is a man, the result is his own name.
Is this a bug, or am I missing something? I am using FH 4.0.2
ID:3901
* Strange behaviour of %INDI.~SPOUgt;NAME%
- Jane
- Site Admin
- Posts: 8442
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Strange behaviour of %INDI.~SPOUgt;NAME%
I am not seeing that problem on %INDI.~SPOU[1]>NAME[1]%


using the same 4.0.2 version. Can you send me the query to janetaubman at gmail.com so I can see if I can spot the problem.


using the same 4.0.2 version. Can you send me the query to janetaubman at gmail.com so I can see if I can spot the problem.
-
davepacey
- Famous
- Posts: 135
- Joined: 22 Nov 2002 19:00
- Family Historian: V7
- Location: Lincolnshire, UK
Strange behaviour of %INDI.~SPOUgt;NAME%
This would happen if you had selected %INDI.FAMS>~SPOU>NAME% rather than %INDI.~SPOU>NAME%
Regards,
Regards,
- Jane
- Site Admin
- Posts: 8442
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Strange behaviour of %INDI.~SPOUgt;NAME%
The query you sent is using the one David mentions if you use %INDI.~SPOU>NAME% it will work correctly.
I will highlight the FAMS version over the Calico, but for now use the simpler one. I suspect the other one returns
[1] Husband and [2] Wife, but I have not tried it.
I will highlight the FAMS version over the Calico, but for now use the simpler one. I suspect the other one returns
[1] Husband and [2] Wife, but I have not tried it.
Strange behaviour of %INDI.~SPOUgt;NAME%
Many thanks to both Jane and Dave for solving this one for me. My brain hurts!
- SimonOrde
- Program Designer
- Posts: 352
- Joined: 18 Nov 2002 10:20
- Family Historian: V7
- Location: Calico Pie
Strange behaviour of %INDI.~SPOUgt;NAME%
Jane is quite right. When we added support for same sex relationships, we needed a gender-neutral way of accessing the two spouses in a family record. So we extended the role of the ~SPOU shortcut so that it could be used not just with individuals, but also with families. To quote from the Help:
'When used in the context of a Family record, the Spouse shortcut, with index 1, will return the first spouse of either sex, and, with index 2, will return the second spouse of either sex.' (this is in the section on 'Shortcuts' in the page 'Understanding Data References').
'When used in the context of a Family record, the Spouse shortcut, with index 1, will return the first spouse of either sex, and, with index 2, will return the second spouse of either sex.' (this is in the section on 'Shortcuts' in the page 'Understanding Data References').