Jump to content

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

Recommended Posts

Posted

The formula of my indexed calculation field contain a Status(CurrentDate) function.

The field must be indexed and I don't want to use the Today() function.

When a new record is created the field is calculated correctly.

It is recalculated when any of the referenced field is modified (even if they don't influence the result).

[it is also possible to recalculate it when ANY field gets modified, with a non-influent reference to a time field with modification time auto enter option on]

Are there any other conditions that make the field recalculate?

How do you deal with indexed calculations that depend on the current date ?

Thanks, Paolo.

Posted

There are any number of ways to force a calculation to update - via triggers and scripts etc, and from the sound of it, you've already explored some of them.

Rather than having forum users attempt to indicate an exhaustive list of options, however, it might be more to the point if you were to outline what circumstances you want the calculation to update in which you are not presently achieving. It might also be helpful to know why it is that you're reluctant to use the Today function - in order to understand what it is you are trying to avoid, as well.

That way the bandwidth can be targetted at actually helping you *solve* your problem! smirk.gif

Posted

CobaltSky said:

That way the bandwidth can be targetted at actually helping you *solve* your problem! smirk.gif

Ray, I wasn't detailed on my question because I don't have a real problem to solve.

I'm trying to learn more about the Current Date topic to discover better ways to deal with it (better than the one I'm currently using).

I dont want to use the Today function because (correct me if I'm wrong) it is recalculated only when the database is opened. So the database have to be closed and reopened every day. If the database is hosted with FM Server it have to be closed, opened with FMPro, closed and reopened with FMServer.

My calculations with dates are, most of the time, very easy: just checking if a given date has expired.

For example:

ExpiryDate (date field)

IsExpired (calculation field) = Status(CurrentDate)>ExpiryDate

With a relationship between a constant 0 and IsExpired I can easily display non-expired records on a portal.

This is my most frequent scenario.

Thank you!

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