December 16, 20223 yr 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
December 17, 20223 yr 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 December 17, 20223 yr by comment
December 17, 20223 yr As @LaRetta was kind enough to remind me, one needs to consider what to do with dates that fall on February 29 in a leap year. My demo will show them on March 1 of a non-leap year. If that's not the wanted result, then there's a bit more work to be done. Edited December 17, 20223 yr by comment
December 17, 20223 yr Author 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
Create an account or sign in to comment