Jump to content

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

Recommended Posts

Posted

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.

Posted

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!

Posted

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

This topic is 8461 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.