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 7176 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi Storm,

If I'm understanding you correctly, you can Not sort the data within the filed like you can the fields.

However, maybe your problem can still be solved by providing a lot more information, and a sample of your files and and other data that is pertinent to your problem.

Just a WAG, but I'm betting that this is data that was imported and you are trying to organize it into fields, etc..

HTH

Lee

Posted

You can build a sorting routine into a Set Field script step. This is tedious, but doable. If as Lee suspected, you are importing data that needs to be organized, there may be a better approach. As a general rule, data in a single field that needs to be sorted indicates you should take a fresh look at your DB design.

Posted

If the data in the field is return-delimited, then this is relatively easy and requires no script.

See attached for sample. Note that when creating a new record, you must commit it before entering data into the field.

If it is not return-delimited data, you can probably do the same thing with a couple of tweaks.

SortFieldData.zip

Posted

Hi JT,

Sweet!

I knew someone would jump at the chance to prove my carefully worded response inaccurate, and I figured it would be you, Ugo or comment. LOL

I had thought about a Value List approach, but my brain is still stuck in v6, and I haven't spent enough time (too busy with a client) play with the new stuff.

I can see some value for this approach.

Lee

Posted

Hi, Lee! I think Ugo is busy and I'm just lucky I beat comment to the punch. wink.gif

Posted

I haven't got into this because I don't know what "sort text within a field" means.

If we are after sorting paragraphs, then my punch would have been different anyway (see 'Scripted sort' in attached).

And I believe yours can be simplifed as shown. Still, there's a problem with a new record. And both methods remove duplicates, which may be desired - or not.

SortDataInField.fp7.zip

Posted

Good point on the dupes.

Here's a version that should work with up to 100 words (FM7 indexes up to 100 characters per 'word', doesn't it?), doesn't remove duplicates, and doesn't require committing the record initially.

Yes, it is scripted; I could not get it to work quickly enough without using a script.

SortFieldDatav2.zip

Posted

I think I 'borrowed' that one from Ray, or at least some version of it anyway. It comes in quite handy sometimes.

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