Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have just spent the last 2 hours thinking I am going stupid - perhaps I am but a very simple sequence appears not to work

I have a simple manual find followed by a simple sort.

Both the find and the the sort are attached to scripts - BOTH WORK FINE on their own.

But...

Enter find mode and then enter criteria hit return as step 1 of another script then run the sort immediately afterwards on the found set as teh second step AND.... Nothing!

I just cant see why. I have tried various combinations of keeping and restoring the finds and sorts in the script steps all to no avail.

I am sure this is a case of mental block so please help asap

thanks everyone

Posted

Silly things. Are you sorting on the correct field? Are you hitting the Sort and not Unsort button? Are you in Browse Mode? One possibility is that the found records are already sorted according to a criteria that makes it appear that nothing is changing.

What OS and FM version are you running?

-bd

Posted

I am using WinXP Home. I am hitting ALL correct buttons.

The scripts are VERY simple.

Enter find Mode (Pause)

Enter Browse mode

Perfort Sort

The same sort that works as an individual script. Also the correct sort sequence is present in the manual sort box after the script ends - the only thing is the records are not sorted correctly. The Sort just does not work.

I cant believe that I am the only person to have run into this problem.

I am just totally lost with it. I can create another button and attach the sort script afterwards - the only thing is that it will not work automatically after the find.

Incidentally it WILL work in another script where I show ALL records automatically and then perform the sort.

It must be something to do with the find script but it really is such a VERY simple script - I just cannot see how it can be

But thanks - Any more suggestions anyone?

Posted

First of all when you use "Enter Find mode" in a script, you have to follow it with a "Perform Find" step, not an "Enter Browse Mode" step. So, at the very least, you need to do this:

Enter find Mode (Pause)

Perform Find [no restore]

Perform Sort

To figure out why the sort doesn't work, you should print out your script. The printed version of the script will show you the sort order that the sort step is using. Make sure it's correct. If it is, then there are a couple of possibilities. The first is that somehow your script terminates before getting to the sort step. The second is that the index of the file may have become corrupted.

Posted

Each script can only save one sort order. If you want a script to first sort one way, then another you have to think laterally...

Create a script for each of the sorts you want to perform... the scripts need only be one line, the sort step. You'll end up with one sort script for each sort.

Now in your main script, perform the appropriate sort script you created above instead of using the sort step itself.

Posted

The database has c.1000 records with 22 fields.

I run a find script which gives the user the opportunitry to manually find any records. This script (findrecs)runs perfectly well.

I have another script set up to sort the found set in a particular order.

I can also run this script by itself and it works

I have tried creating a third script which first runs (Findrecs)and then should run (sortrecs). It does finds the records but does not sort. Although the sort box shows sort criteria ready. I can also manually tell it to sort and the correct sort works. It just will not work as a second step to the script. It must be the find script that is blocking it but I just cannot see why or how to stop it.

Posted

A couple of things you can do to trouble-shoot:

1) Put a "Beep" step in the script so you can confirm it is being performed.

2) Uncheck the "no dislog" option in the Sort script step to make it prompt for the sort order.

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