Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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.

Posted

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?

Posted

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?

Posted

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.

Posted

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.

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