I have downloaded the excellent custom query Name Search and I would like to make some changes in the rows tab. I have tried but I have not had any success:
Change 1: Exclude unless Given Name contains "First Name" or Nick Name contains "First Name" I cannot see how to create an OR function
Change 2: I would like to have an earliest date and a latest date. If I add "Exclude if %INDI.BIRT.DATE% was earlier than 1800" it excludes all records. However if I run a query with just this line it works perfectly. I know that there are records which it should find.
Thank you for the swift reply. I think I have to create a column which returns true or false. Having looked at the help on the function I have tried =TextIf(ContainsText(%INDI.NAME:GIVEN_ALL%,"First Name",STD) or ContainsText(%INDI.NAME.NICK%,"First Name",STD),"Found","Not Found")
and this works provided I change "First Name" to the required value
a) I would like to be able to enter a parameter b) I am now not sure if I have to use a column because I cannot see how I can get this value into the rows tab. But also I have failed to grasp how I can enter my expression directly into the rows tab.
After leaving the computer for a while, the problem with dates has gone away which is good news for now.
The specific Change 1 Row Filter is: Condition: Exclude unless Expression: =IsTrue(ContainsText(%INDI.NAME:GIVEN_ALL%,["First Name"],STD) or ContainsText(%INDI.NAME.NICK%,["First Name"],STD)) Operator: is true
The specific Charge 2 Row Filter is: Condition: Exclude if Expression: %INDI.BIRT[1].DATE% Operator: was earlier than Value: 1800
The other Change 2 Row Filter is as above but Operator: was later than Value: 1900
Remember this will only find Individuals that both match the Name criteria and were born after 1800.
Mike Tate is researching the TATE and SCOTT family tree and all relations.
Many thanks for these answers: it now works well. I have decided that I would like to remove a few more possibles. If I have a photo labelled "Mary Muggins 1930" and she looks about 70, I can look for any Mary Muggins born between 1830 and 1880 (age 50 to 100 in 1930) and who was still alive in 1930. Another criterion is that if she was born Mary Muggins but married someone before 1930 then it is unlikely that the photo would be labelled "Mary Muggins"
I have tried the following expression to remove these cases for the rows but FH will not accept it. Some help on what is incorrect about it would be a help. Exclude if
=IsTrue(Fieldtext(%INDI%, 'INDI.NAME:SURNAME') matches ["Surname"] and FieldText( %INDI.FAMS[1]>%, 'INDI.FAMS[1]>MARR[1].DATE') was earlier than ["Earliest Date of Interest"]))
I will also need to add some additional similar expressions for the other possible marriages.
Is there a reference book / help page with a few more examples available?
The Expression you need is: =IsTrue((%INDI.NAME:SURNAME% = ["Surname"]) and (%INDI.FAMS>MARR.DATE% < ["Earliest Date of Interest"]))
Here are some explanations.
(1) Operators Row filter Operators such as matches and was earlier than are not valid comparison Operators for use within Expressions. You must use = or < as defined within Help > Family Historian Help > Using Family Historian > Advanced Topics > Understanding Functions > Operators.
(2) Data References You do not need to use the FieldText() Function, you can reference the fields directly. See Help > Family Historian Help > Using Family Historian > Advanced Topics > Understanding Data References.
(3) Data Types The FieldText() Function Return Type is a Text Data Type. So even when the Parameter 2 Data Reference is a DATE, the returned value will be a text string. So comparing with a Date will NOT work as expected, because they will be compared as text strings.
The Help > Book: "Getting the Most From Family Historian 5" has a chapter on Custom Queries, but not a great deal on using Functions. This is considered an advanced topic, so you will need to study the Help > Family Historian Help > Using Family Historian > Advanced Topics section and practice with experimental Queries, starting with one Function at a time until you are comfortable with parameters and data types, then introduce operators to compare Functions.
Mike Tate is researching the TATE and SCOTT family tree and all relations.
In Understanding Functions the manual says "it may help to look for an example of a standard query that uses them, and try to copy what it does." The list of standard functions is so long it is difficult to know which ones to look at.
I have uploaded the query in case it is of use to others.
This web site was made with WebAPP v0.9.9.3.3, a web portal system written in Perl
All trademarks and copyrights on this page are owned by their
respective owners. Comments are owned by the Poster.
Marble theme based on "Crash" theme by my2cents