February 18, 200223 yr This may be a redundant post, but thought it might be helpful. I needed an FMP results page that only shows events that are current (happening today or in the future). After spending some time going through earlier posts on the subject, here's what I found: A calculation field is no good because the calculation is done when you create the record (our database stays open all the time, so it doesn't get recalculated). The simplest solution is to use the [FMP-CurrentDate] field in the first page (the search or link page), and then compare the date field in your database to [FMP-CurrentDate]. As was pointed out in the earlier posts, FMP must be serving up the first page in order to have [FMP-CurrentDate] generate a value. Using a redirect solves that problem nicely. I'm not going to re-post the exact code -- it's all in the earlier two posts -- just thought that after playing with some of the earlier suggestions (javascript, calculation field, etc.) I'd let you know what I found to be the easiest and most efficient solution. Thanks a ton to all of you who posted on the earlier topics -- I never would have figured this one out.
February 18, 200223 yr Author Garry and Keith: You're both right. My screwup was having the field be a text field with an autoentered calculated result instead of being a calculation field. This nicely solves my earlier post about avoiding a double redirect since Filemaker now determines the current date, rather than having the web browser post that value via FMP-CurrentDate. Much easier solution. Thanks for the tip. At this rate I may just learn how to use this program!
February 19, 200223 yr quote: A calculation field is no good because the calculation is done when you create the record (our database stays open all the time, so it doesn't get recalculated). I think that if you use 'Status(CurrentDate)' as an unstored calculation this will update each time the record is accessed. I hope this is the case because it is used in a couple of my solutions. Somebody maybe able to add to this. All the best. Garry
Create an account or sign in to comment