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.

Featured Replies

Just had an interesting problem. I had the need to find the "max" of an alphabet character, one per record, related to its associated part number. Background... this new customer uses letters for Revision levels of his drawings. A is first B second, and so on. We need to know the current release of any drawing (highest letter in alphabetic order), so we need to find essentially the "max" of the rev level field in alphabetic sequence and have that available to all part numbers in the file... Now having said that I accomplished it already by using a huge case file converting the letter to number then using the obvious methods, max number, etc to get to the solution, then once there converting it back to text, not an elegant solution, but works and I can get the data to other related files simply based on the part number. So on to my question, anybody have a simple calc to sort by alphabetic sequence without third part ascii conversion mod's, seems to me there must be a better way than brute force Case conversion, or am I expectting too much from FMP.

Check the attachment.

I think it suits your needs.

Dj

OK, so attach file doesn't work.

It's easy to implent it.

Supposing you have some field that identfy drawings form same serie like squence or whatever, define an self relationship "SelfRel"on this field. Set sort order (sort related records option) for this relationship on your field of interest and make it descending.

Finally define field maxtext=SelfRel::yourTextField

or if you prefer to have ID of record

maxTextID=SelfRel::ID

wher ID is unique identifier of the record.

I'll repost it later.

Dj

A simple way to turn a rev. letter into a number is:

RevNum (calculation, number) =

Position("-ABCDEFGHIJKLMNOPQRSTUVWXYZ", RevLtr)

Leave out any letters you don't use (I & O perhaps). I'm assuming an unrevised drawing is a "-" revision.

-bd

Reposting the attachment.

The formula Brent gave you is ideal if you need to convert 1 letter.

So if that is your situation, I'll recommend it instead of relational solution I gave you.

The attachment deals with multi letter case.

Dj

MaxText.fp5.zip

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.