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

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

Recommended Posts

Posted

I have run into this problem in many different ways, and I wonder if there is a good solution (I haven't seen it).

I have a script that loops through a found set, and calls other scripts. If those scripts end up in the same layout as the calling script, then they can change the found set "behind its back", and end up destroying the logic of the script.

For example, I find all records in Table A that meet a certain criterion, and I set up a loop to iterate through them. But in the loop I end up calling a script that needs to make a selection in Table A, destroying the loop in the calling script.

So, the question is, how can one write scripts that don't need to know anything about the scripts that they call, and can be sure that they won't step on each other?

My first attempt was to use windows to save the selection. If each script opens a new window, then it can't change the selection of the calling script. This works great except that (a) all the flashing windows look terrible, (: it really slows down the script, and © it appears to make FM Pro 10 crash frequently (limited testing on this third point).

So, right now I have set up various table occurrences, and certain scripts use selections in one table occurrence, knowing that all the scripts that they call will use a different table occurrence.

This strikes me as a big kludge, but I haven't come up with a better solution. Is there something I am missing?

Thx

Posted

I believe you should consider this:

http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000754

--sd

Posted

That is cheap, elegant, and understandable. I am still low down on the learning curve for FileMaker, even after all these years....

Thanks!

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