* Custom search help/advice

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
User avatar
postalcae
Gold
Posts: 11
Joined: 14 Jan 2021 20:05
Family Historian: V7
Location: South Carolina

Custom search help/advice

Post by postalcae » 01 Feb 2021 00:20

Working on my first custom query. Using it to learn how filters, functions, etc. work.

My query is designed to find anyone alive (with estimation) in a certain year.

Please see the attached pic. Top image is the column tab ... with an age column tied to a parameter ... date.

The second image is the row tab with 3 rows tied the the same parameter above.

The bottom image is the window asking for the date ... two dates.

How do I create the query so both tabs use the same date input parameter?

User avatar
BillH
Megastar
Posts: 2183
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Custom search help/advice

Post by BillH » 01 Feb 2021 02:12

Your images didn't get attached to your posting. How did you try to attach them? Did you use the ATTACHMENTS tab below the compose window and select add files or did you drag and drop the image files onto the compose window?

In either case if you want to have them show in the posting, put the cursor where you want the image to appear in the posting and then on the ATTACHMENTS tab click the PLACE INLINE button next to the image name.

image1.jpg
image1.jpg (7.36 KiB) Viewed 2001 times

Bill

User avatar
postalcae
Gold
Posts: 11
Joined: 14 Jan 2021 20:05
Family Historian: V7
Location: South Carolina

Re: Custom search help/advice

Post by postalcae » 01 Feb 2021 02:43

Here is the picture. Appears as I am learning my first query ... I am learning how to post as well!

Thank you.
query.jpg
query.jpg (60.72 KiB) Viewed 1993 times

User avatar
BillH
Megastar
Posts: 2183
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Custom search help/advice

Post by BillH » 01 Feb 2021 02:55

At the bottom of the Rows tab are your criteria for selection for each filter. At the far right is where you specify that you want to use a parameter and what it is called.

I believe what you need to do is uncheck the Parameter field for the second filter. To do that select the second filter and uncheck the Parameter checkbox and click on update.

image2.jpg
image2.jpg (6.23 KiB) Viewed 1992 times
Bill

User avatar
LornaCraig
Megastar
Posts: 2996
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Custom search help/advice

Post by LornaCraig » 01 Feb 2021 11:44

There is already a standard query in FH called Estimated Alive At. The best way to learn how to write queries is to start with an existing one which nearly matches your requirements. I suggest you make a clone of that query (use the cog menu>Save as Custom Query) and then experiment with that.
Lorna

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

Re: Custom search help/advice

Post by tatewise » 01 Feb 2021 12:22

The reason there is two Date prompts is that they are two different value types.
The first two Rows tab filters are Numbers (of years), whereas the EstimatedAgeAt parameters are full Dates.

So there are two solutions;
1) Remove the :YEAR qualifiers from the first two Rows tab filters so that Dates are tested instead of Numbers.
2) Use the Number(["Date"]) and Date(["Date"]) functions to force the value types in the two different cases.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
postalcae
Gold
Posts: 11
Joined: 14 Jan 2021 20:05
Family Historian: V7
Location: South Carolina

Re: Custom search help/advice

Post by postalcae » 02 Feb 2021 00:07

LornaCraig wrote:
01 Feb 2021 11:44
There is already a standard query in FH called Estimated Alive At. The best way to learn how to write queries is to start with an existing one which nearly matches your requirements. I suggest you make a clone of that query (use the cog menu>Save as Custom Query) and then experiment with that.
Thanks for the suggestion Lorna but I had already did that and this is where I am. The query gives me what I want but there is a technical "something" causing the two date queries. The why is eluding me.

michael

User avatar
postalcae
Gold
Posts: 11
Joined: 14 Jan 2021 20:05
Family Historian: V7
Location: South Carolina

Re: Custom search help/advice

Post by postalcae » 02 Feb 2021 00:09

tatewise wrote:
01 Feb 2021 12:22
The reason there is two Date prompts is that they are two different value types.
The first two Rows tab filters are Numbers (of years), whereas the EstimatedAgeAt parameters are full Dates.
Mike thank you, this is what I was looking for ... the why. I also appreciate possible solutions.

Thanks to everyone.

michael

Post Reply