Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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...

What about RightValues(ValueListItems( ....etc.:?

--sd

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.