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.

(automatically) alphabetizing list of values in a field

Featured Replies

I'm looking for a way, in a script, where I can set a variable to equal a field containing a list of numbers (separated by carriage returns), sorted in ascending order (the field has the numbers not listed in ascending order; I want the variable to equal a list of all those values, in ascending order).

Is there maybe a function for this, I'm not aware of?

If not, any advice?

Additional info:

The reason I honestly need that is because I need to be able to know which number is higher and lower than a varying percentage of the numbers in the list.

If the script can get it in order, and say I needed the highest value that was lower than 65% of the values, i could do something like:

middlevalues(var ; round (valuecount(var)*.35 -.5; 0); 1)

I may need a long and complicated script to do this many times as just one of many repeating steps in the script, so I'm hoping this can be done automatically, rather than manually.

Why don't you use related records to store your values?

  • Author

Why don't you use related records to store your values?

The secondary table would have at least 500 times as many records as the primary one

I just found this - http://www.briandunning.com/cf/593 ; wouldn't something like that be better?

I don't think so. Filemaker has a built-in mechanism for sorting records, finding the minimum/maximum/average value of a group of records, etc. You could probably do all those things with values in a return-separated list, too - but you would need to build the mechanisms yourself (such as that custom function) and they would be significantly slower that the native ones.

The secondary table would have at least 500 times as many records as the primary one

So?

  • Author

Honestly, related records has always been my biggest weakness. I don't know why but I just never really learned it.

It's kind of embarrassing.

I use data-bloated global fields with text calculations a lot, as a substitute.

Can anyone recommend the quickest way to get a good comprehension of using related records.

I have pretty much all the 3rd party filemaker books, if you think any have a good chapter. But if there's any type of tutorial at all that's really great, please recommend it.

I don't think it's that difficult - you are talking about a very simple, one-to-many relationship here.

In any case, I think it's well worth the investment of your time and effort; possibly, you may see more dramatic speed improvements from organizing your data properly than from adding CPU cores.

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.