Page 1 of 1
On This Day
Posted: 30 Apr 2012 10:03
by Stevebye
Is there a Plugin or Query that will find all events that happened 'On This Day'?
I enter date '30 Apr' and the output displays all the people that have a Birth, Baptism, School, Marriage, Divorce, Death and any other event on that day.
Younger members of the family have asked me for this information.
ID:6200
On This Day
Posted: 30 Apr 2012 10:55
by Jane
The Families Anniversaries plugin finds all anniversaries/birthdays in the next 7 days.
It's easy enough to add Day and Month filters to a standard Fact Query.
On This Day
Posted: 30 Apr 2012 12:34
by tatewise
Start with the Standard Query All Facts.
Use the Query Menu top right and select Save As Custom Query with a name such All Facts On This Day.
On the Rows tab add a filter as follows:
Condition: Add if
Expression: %FACT.DATE%
Operator: was on
Tick Parameter on the right and set Label to say On This Day?.
Run the Query and enter any valid Date then every Fact will be listed that matches that Date or has a date range that includes that Date.
On This Day
Posted: 30 Apr 2012 12:46
by Jane
Mike, I think Steve was looking to not specify a year.
A sort of on this day in history.
http://www.fhug.org.uk/cgi-bin/index.cg ... ies&id=134
On This Day
Posted: 30 Apr 2012 13:30
by tatewise
After a while that became apparent as I mulled it over during lunch.
An alternative Row filter using the same On This Day? Date parameter could be:
Condition: Add if
Expression: =IsTrue((IsEmpty(Day(['On This Day?'])) or (%FACT.DATE:DAY% = Day(['On This Day?']))) and (%FACT.DATE:MONTH_NUMBER% = Month(['On This Day?'])))
Operator: is true
Enter any Date with any Year (with or without a Day number).
The Query will list all Facts that match the Day & Month, or just the Month if no Day, regardless of Year.
This method of Date entry accepts all forms of Date, such as 12 Jan 2012 or 12/1/2012 or Jan 2012 or 1/2012.
[EDIT] The above expression is not quite correct - see postings below.
On This Day
Posted: 30 Apr 2012 22:45
by PeterR
I found that for some reason, the use of IsEmpty() didn't work, but the following expression seems to work OK:
=IsTrue((('' = Day(['On This Day?'])) or (%FACT.DATE:DAY% = Day(['On This Day?']))) and (%FACT.DATE:MONTH_NUMBER% = Month(['On This Day?'])))
I also added filters to exclude Census and Occupation facts:
Condition: Exclude if...
Expressions: =FactLabel(%FACT%)
Operator: matches
Value: census
& repeat with
Value: occupation
On This Day
Posted: 30 Apr 2012 22:59
by tatewise
Yes, Peter I agree that is correct.
I had tried (Day(['On This Day?']) = '') as the first test, which strangely does not work.
I thought (IsEmpty(Day(['On This Day?']))) was the solution, but on rechecking find it is incorrect.
On This Day
Posted: 02 May 2012 23:18
by Stevebye
tatewise said:
After a while that became apparent as I mulled it over during lunch.
An alternative Row filter using the same On This Day? Date parameter could be:
Condition: Add if
Expression: =IsTrue((IsEmpty(Day(['On This Day?'])) or (%FACT.DATE:DAY% = Day(['On This Day?']))) and (%FACT.DATE:MONTH_NUMBER% = Month(['On This Day?'])))
Operator: is true
Enter any Date with any Year (with or without a Day number).
The Query will list all Facts that match the Day & Month, or just the Month if no Day, regardless of Year.
This method of Date entry accepts all forms of Date, such as 12 Jan 2012 or 12/1/2012 or Jan 2012 or 1/2012.
I've followed the instructions above but getting the wrong output. If I enter '2 May' I get all the Birth's, Marriage's and so on for all the dates in May across the years.
What I want is to enter '2 May'(without the year)and get all the Birth's, Marriage's and so on that occured on the 2 May across the years.
I.e.
2 May 1765 Birth Mary White
2 May 1784 Baptism Robert Smith
2 May 1876 Marriage Leonard Brown and Doris Price
2 May 1967 Death Thomas Green
2 May 2012 Birth Emily Jones.
On This Day
Posted: 02 May 2012 23:39
by PeterR
My post above (30/04/12 at 22:45:15 GMT) contains a revised version of the expression which works.
On This Day
Posted: 03 May 2012 15:49
by Stevebye
Downloaded the query from the store. Spot on, thanks. [wink]