Jump to content

Auto create a each year repeating date like a birthdate to show up in a calendar using a birthdate field.


Mark Jones

This topic is 493 days old. Please don't post here. Open a new topic instead.

Recommended Posts

First off I am not a programmer.  I am a woodworker that gets clunky stuff to work.  GRIN!  So I have a calendar in my Church Boy Scouts Program called the Ranger Database.  I am not for profit but have been doing this since Filemaker 3.0.  I enjoy making clunky stuff that serves the needs of our Royal Rangers.  I am using FM 18 Advanced and still publishing solutions.

My eyes are bloodshot looking for a idea on how to make a date like 01-28-1959  automatically show up each year by only one data entry.  Have a field next to the date field that says Annual date and it would then create on the fly that same date for the next 10 years.  

I would appreciate a nudge in the right direction on this.  Any help is very much appreciated. 

Thanks!

 

Mark Jones

Link to comment
Share on other sites

6 hours ago, Mark Jones said:

how to make a date like 01-28-1959  automatically show up each year by only one data entry

I am assuming that by "show up" you mean show up on the "many" side of some relationship, where the match field on the "one" side can have a value of 01-28-1982 or 01-28-2005 or Jan 28 in any year? If my assumption is correct, then this would rule out a solution where the result is unstored (such as a calculation field that would dynamically produce the date of Jan 28 in the currently viewed year).

So how do you produce a stored result? The simple solution to make a date "annual" would be to split it into two fields - a field for day and a field for month - and make the relationship match on both these fields. This would make the date related in ANY year of the 4000 years that Filemaker allows. However, this would also require a separate relationship for dates that are deemed "annual". 

If you want the same relationship to include both "regular" and "annual" dates, then you need to generate the additional dates - either by calculation or by script - and that means that there will be a fixed number of them. 

Here's a skeleton demo showing how you could make a user-entered date repeat for up to 10 following years. Of course the range can be easily expanded - even to the full 4000 years. Note that the calculation field's result type is Date, in order to eliminate a possible discrepancy between "01-28-2022" and "1-28-2022".

 

 

AnnualDates.fmp12

Edited by comment
  • Like 1
Link to comment
Share on other sites

Thanks so much.  You and LaRetta have been so helpful for so many years.  What seems so easy for you both is a world away from my mind.  Thanks for sharing your gifts in this area.  

Will chew this over and over and over again and see if I can clunk this into my calendar program.  

Appreciate the time and good work. 

Mark Jones

Link to comment
Share on other sites

This topic is 493 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.