sahons Posted June 16, 2006 Posted June 16, 2006 Hello all I have a database (FM 7, PC) with art objects and I would like to adjust my search function so that it sorts the data (using a unique code) after finding it. Right now, it shows all the found data in no apparent order and I have to use a sort script afterwards. As others will use the database as well (who might even know less about FM than I do), it would be much more convenient if the sorting was integrated in the search script. I've tried to add the sort function to my search script but it didn't work so far. Can anyone help me with this? P.S. I'm not posting the search script as it is in German, but if anyone needs it in order to help me, I will translate it.
John Mark Osborne Posted June 16, 2006 Posted June 16, 2006 After performing a find, your records are shown in creation order. If you want to sort them, creating a script is exactly the same as performing a sort manually. After you run your find script, are you able to manually sort them the way you want? If so, edit your script after sorting manually and add the sort step somewhere after your Perform Find step. Make sure you tell it to sort without the dialog and restore (specify sort order). When you specify the sort order, it will contain the last manual sort you performed so it should be easy to add it to your script.
sahons Posted June 16, 2006 Author Posted June 16, 2006 Thank you for replying. I have no problem sorting the data manually after performing a search. I've tried to add the sort function to my search script (at every possible position) but it still doesn't work. Is there maybe an additional step I have to add in order to make it work? I start translating the script, maybe that will help.
sahons Posted June 16, 2006 Author Posted June 16, 2006 Translating was easier than I expected, just had to change the user interface language. I've added a screenshot of the search script I'm using.
John Mark Osborne Posted June 16, 2006 Posted June 16, 2006 Should be able to add the sort script after the last End If step.
sahons Posted June 16, 2006 Author Posted June 16, 2006 You are right, it works like that. The problem remains though. It only works if I go to 'find mode' and manually activate the adjusted find script. I just realized that I must be looking at the wrong script. When using find mode there seems to be another script. As there is no other find script in Script Maker, I assume that the one being used is a hidden one (?). I could add a search button in my layout that would use this find script. But I would like to avoid that, if possible. Which script is being activated when pressing enter in 'find mode' or using the find button in the status area?
sahons Posted June 17, 2006 Author Posted June 17, 2006 I have solved the problem! There is a "Search" button in each of my different layouts. Before, I only used it to go to "find mode". I've changed that now, specifying a simple script (see attached picture) for it - and it works just fine. Thanks!
Recommended Posts
This topic is 6734 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 accountSign in
Already have an account? Sign in here.
Sign In Now