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

Best way to calc Max() of a text field with version# ?


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

Recommended Posts

Posted (edited)

FM7.

Given: the developer keeps track of changes to a database solution inside the database in a table that includes a text field with a version # like 1.3.2. The table has the usual serial # field.

There's one layout with a portal listing all records. A calc field keeps track of the highest serial# (Max( ChangeLog::ID )) A relationship exists between this calc field and the ID field.

The idea is that when a new change record is created, the highest version # should prefill the field. The developer then has the option of changing to a higher verson or leaving it. A lookup only works if the current record on creation is the previous highest.

Question: What's the best way to calculate the highest version # at any time regardless of the found set - without scripting?

I'm brainfarting, stuff I've tried all has been problematic...

Edited by Guest
Oops...
Posted

I would probably add a calculation to convert the version number into sortable text, such as 001003002 for 1.3.2. Then sort your relationship by this field, descending. Relationship::version should then be the current highest version number.

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