Puzzling Two-Step Search

Discussion created by StephenWonfor on Jun 15, 2012
Latest reply on Jun 19, 2012 by StephenWonfor



An odd little puzzle is this: A script that alternates between returning a foundset of 0 and a foundset of "n" records. Fails first time then generally works after that, though for a while it was failing every other attempt.


The user inputs search parameters into a series of global fields in a "Trainer" table.

The seach looks into "Certifications" and "Companies" using a trainer_id::trainer_id relationship.

The search parameters are loaded from global fields into local variables.


The script logic is like this:


0. Commit records.

1. Set local variables from the global fields. No global variables are set oir used.

2. Test conditions for various search parameters.

3. Execute the search.

4. Use the List() function to pull data from the related tables into a variable.

5. Write the variable into the body of an eMail and send.


This is OSX 10.7.4 with FMA11 v0.4. Server 11.


The failure is almost 100% on first try if I close the db and then reconnect. This makes no sense.





"Egotism, n: Doing the New York Times crossword puzzle with a pen." --- Ambrose Bierce