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

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

Recommended Posts

Posted

I've been banging my head with this one all afternoon. What I want to do is enable the user to do a find and when the found set is zero, restore the previous found set.

What I am doing:

setting the variable $$window with the name of the window

setting the variable $path with the path to the temp folder and naming the file.

create the snapshot file and sending it to the $path

run the find script steps

if get(foundcount) = 0

show message

rename the window to $$window& 0 (so it has a different name)

Open URL (file:/" & get(temporarypath) & $$window &".fpsl")

exit script (or halt script, it doesn't seem to matter)

Now this works perfectly. There's a brief flicker and the user is taken back to the previous found set. Unfortunately, in the window list, there is $$window & 0. And over the course of day, there may be quite a few of them.

I tried to close the original window, but that would either close the file before the snapshot could come back or the snapshot would trigger the file to open again complete with the open scripts and the enter username and password. I also tried putting in a pause or closing the $$window & 0 from another script but it had the same result.

I tried to hide the window, but that would hide the window and then we'd have to wait for the snapshot to come up. This would also cause a buildup of windows.

Right now, the only way I can think to close the window, when they run the find script tell it to close any $$window & 0 that may be lurking about before it runs the script. While this will do the job, it's not as elegant as I would like.

Anyone have any suggestions?

  • 2 weeks later...
Posted

I use a technique to restore a found set that takes advantage of the fact that a table occurance will retain it's found set seperate from other table occurances. It's a strange technique in that you create a table occurance to hold the found set that is not linked by relationship to anything else and a layout based on that TO that doesn't actually need to have anything on it. Before doing the find you would use goto related records showing records from your original TO but using layout based on the SaveFoundSet TO. Then goto your original layout to perform the find. If the found count is 0 you would goto the SaveFoundSet layout and use goto related records showing records from the SaveFoundSet TO but using your original layout to return to your starting point with the original found set intact.

P.S. Should probably give credit to John Mark Osborne for that technique. I learned it from his FileMaker tutorial videos available at VTC.com

  • 2 weeks later...
Posted

What I ended up doing, at the suggestion of another developer, is open a window and do the find. If the find set is 0, close the window and I will have my previous found set. If it is >0, close the window and redo the find. The second window is opened off screen so that the user doesn't see what is going on.

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