Jump to content

search and sort


This topic is 6495 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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!

search_script_2.jpg

Link to comment
Share on other sites

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