* Is there support for the 'In' function in queries?

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
quarlton
Famous
Posts: 150
Joined: 26 Feb 2004 13:07
Family Historian: V7
Location: Lincolnshire
Contact:

Is there support for the 'In' function in queries?

Post by quarlton » 31 Aug 2021 10:37

Is there a way of using 'In' with a query?
e.g.
Pick up the country name for an event place using =TextPart(%_PLAC%,-1) to get the last element of the Place
Assume that this returns "Australia"

What I would like to test in the query is along the lines of this:

Exclude if "Australia" is in (Australia, New Zealand, Brazil, Russia)

Unfortunately it is not practical to search the Forum for a common word such as "In" so this question may already have been answered.

Many thanks
Dave Simpson ~ Boulton, Braham, Carney, Simpson and Jacobs

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Is there support for the 'In' function in queries?

Post by tatewise » 31 Aug 2021 11:38

Not exactly, but you can use the =FindText(...) function to achieve the same result.
e.g.
Exclude if
=FindText( "Australia, New Zealand, Brazil, Russia", TextPart(%FACT.PLAC%,-1,1,STD), 1 )
is greater than
0

Tip: When looking for row filters don't overlook FH Functions that may offer a workaround:
Visit Understanding Functions and click on Functions (all) to obtain a complete list or New Functions (added in 7.0).
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
quarlton
Famous
Posts: 150
Joined: 26 Feb 2004 13:07
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Is there support for the 'In' function in queries?

Post by quarlton » 31 Aug 2021 13:30

Many thanks for that Mike.
Dave Simpson ~ Boulton, Braham, Carney, Simpson and Jacobs

Post Reply