Page 1 of 1

Strange behaviour of %INDI.~SPOUgt;NAME%

Posted: 30 Jul 2009 16:19
by Rgemini
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%

Posted: 30 Jul 2009 16:52
by Jane
I am not seeing that problem on %INDI.~SPOU[1]>NAME[1]%

Image

Image

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.

Strange behaviour of %INDI.~SPOUgt;NAME%

Posted: 30 Jul 2009 18:48
by davepacey
This would happen if you had selected %INDI.FAMS>~SPOU>NAME% rather than %INDI.~SPOU>NAME%

Regards,

Strange behaviour of %INDI.~SPOUgt;NAME%

Posted: 30 Jul 2009 19:08
by Jane
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.

Strange behaviour of %INDI.~SPOUgt;NAME%

Posted: 30 Jul 2009 21:03
by Rgemini
Many thanks to both Jane and Dave for solving this one for me.  My brain hurts!

Strange behaviour of %INDI.~SPOUgt;NAME%

Posted: 31 Jul 2009 08:20
by SimonOrde
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').