Page 1 of 1

Custom search help/advice

Posted: 01 Feb 2021 00:20
by postalcae
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?

Re: Custom search help/advice

Posted: 01 Feb 2021 02:12
by BillH
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 2006 times

Bill

Re: Custom search help/advice

Posted: 01 Feb 2021 02:43
by postalcae
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 1998 times

Re: Custom search help/advice

Posted: 01 Feb 2021 02:55
by BillH
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 1997 times
Bill

Re: Custom search help/advice

Posted: 01 Feb 2021 11:44
by LornaCraig
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.

Re: Custom search help/advice

Posted: 01 Feb 2021 12:22
by tatewise
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.

Re: Custom search help/advice

Posted: 02 Feb 2021 00:07
by postalcae
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

Re: Custom search help/advice

Posted: 02 Feb 2021 00:09
by postalcae
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