Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I want to calculate the ninimum and maximum value on a date field (earliest and latest date) of a set of records.

I created two global fields and have a script that set this fields one with the max(field) and the other with the min(field) function.

The problem is that when the script is run, it sets both fields with the minium value (earliest date).

Does anybody knows how to make it work?

thanks.

confused.gif

Posted

The problem is that Max(date) or Min(date) is only going to return the date itself. You need a constant self-relationship (i.e. either a constant field related to itself or a global field related to a constant of 1) to compare all records in the file. And you need more complications to calculate this for only the currently found set of records. Why not take an easier route and just sort by the date, go to first record and set the minimum field, then go to the last record and set the maximum? Either that or use summary fields, if you only want to display the data and need not perform any calculations with it.

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