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

Sort within a field?

Featured Replies

Hi. Does anyone know how to sort text within a field? Thanks!

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

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.

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

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

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

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

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

Nice. I still don't know what it might be good for, but that "Repeat() function" is way cool! Consider it stolen. applause.gif

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.