June 3, 200520 yr 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
June 3, 200520 yr 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.
June 3, 200520 yr 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
June 3, 200520 yr 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
June 5, 200520 yr 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
June 7, 200520 yr 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
June 8, 200520 yr Nice. I still don't know what it might be good for, but that "Repeat() function" is way cool! Consider it stolen.
June 8, 200520 yr 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