The most basic answer to your question is No, you can't sort the records on the server, sorting happens at the client.
- Records are naturally sorted in their creation order. If you know the sort order and you want it to remain the same for all users, it would be possible to do a server side script that sorted the records as you want them, exported them, deleted them, reimported from the export, so now their creation order is the same as the sort order you want. All kinds of potential problems here, be careful.
- Another option would be to rethink what you are showing the end user. How useful is it really to have 800 sorted parts records to scroll through? Perhaps a better solution is to start them with no found set, or the 20-50 most commonly used parts? Going to a big list and scrolling for what you want is still spreadsheet thinking. Much better to use FileMakers search capabilities to start with fewer (or even zero) records and then let users search for what they want.
Hope that helps,
Another option mght be to:
3. Display the data in a virtual list. In this case you could utilize the server to gather the data you want, sort it, and push back the IDs you need to produce the virtual list.
Virtual lists maynot be the right choice here, but you should go learn about them at some point anyway :-)
There are lots of blogs and articles about the virtual list (brain child of Bruce Robertson), just google for FileMaker Virtual List Bruce Robertson and enjoy.
Thanks for the assist Chad.
In talking with the guys that will ultimately be using the system, which I should have done a bit earlier, they said that there really is no reason to sort everything at all....they intend to just pop in a part number to search for and really have no intention of searching through our entire parts catalog, which makes sense. You're quite right though, I was spreadsheet thinking. So after all that, I am just going to remove the sort trigger when the database is accessed since there really is no reason for it. I'm definitely going to do some research into the virtual lists though. It sounds like an interesting topic.
On another note, can you, or anyone for that matter, recommend a good resource for learning how to write scripts? The concept makes perfect sense to me, I'm just not well versed in how to formulate them correctly. It's actually quite a daunting thing for me.
Sorry for the delay in replying.
Scripting is VERY powerful and you can do a TON of stuff. But it can basically be thought of as a series of instructions that tell the system to complete a particular task. FileMaker scripts are very linear, they basically start at the top and run each step in sequence.
You can often times think about what you would manually do to complete the task, then go to the scripting engine and see how many steps there are that replicate the maual actions (go to layout, perform find, set field, etc...).
FileMaker has a great resource for getting you started here.