* Query not returning expected results.

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
TimTreeby
Famous
Posts: 170
Joined: 12 Sep 2003 14:56
Family Historian: V6.2
Location: Ogwell, Devon
Contact:

Query not returning expected results.

Post by TimTreeby »

Using V6.

Have a query which should be returning Last Spouses Surname if Female else return Surname.
Problem is, is returning Full name rather than just the surname.



SurnameCol.PNG
SurnameCol.PNG (5.87 KiB) Viewed 166 times

Query Result.PNG
Query Result.PNG (24.07 KiB) Viewed 166 times
User avatar
tatewise
Megastar
Posts: 28488
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Query not returning expected results.

Post by tatewise »

That is because you are using =ItemIf(...) instead of =TextIf(...)

The :SURNAME qualifiers are not a data reference, but produce a textual name.

So =ItemIf(...) forces FH to ignore the :SURNAME qualifiers and just use the whole NAME data references.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Jean001
Famous
Posts: 133
Joined: 03 Mar 2021 11:49
Family Historian: V7

Re: Query not returning expected results.

Post by Jean001 »

Some time back I got caught in this trap, it is easily done.
Jean
Post Reply