madman411 Posted April 20, 2013 Posted April 20, 2013 Hi All My system uses "modules" which have additional windows that open out from it. I want to make sure the related module windows are closed before the user attempts to "close the module" For example: from the main menu the user can click "Lenses" which will take them to a list of lenses in a new window. The user can click the lens they want and it will open in a new window called "Lens QC {Name of lens}" I'm trying to prevent them from closing the "Lenses" module window while the "Lens QC ..." window(s) are still open. Each window has an Exit button. Currently I'm using this script (which I know isn't the best route to take). This script is attached to the Exit button in the Lenses module. If [FilterValues ( WindowNames ; "Lens QC" ) = ""] Close [Current Window] This script works just fine, but I've had to eliminate the {Name of lens} portion of my window name as this script fails to recognize anything except "Lens QC" and will exit the script as it's supposed to. Including the {Name Of Lens} portion makes it easier for my users to find records they have already opened, but minimized. I believe a ¶ symbol should be placed somewhere in there, but I can't seem to figure it out. Advice?
Vaughan Posted April 20, 2013 Posted April 20, 2013 Don't compare things to "" instead use the IsEmpty() function, that's what it was invented for. IsEmpty( FilterValues ( WindowNames ; "Lens QC" ) ) I'd try to work out why the "name of lens" part isn't working: it should work. An alternative approach I'd think about is to let people do what they think is natural, but to clean up after them: that is, let them close the "name of lens" window as they like, but as part of these windows closing check that the main Lenses module window is still open, and open one if it's not. 1
madman411 Posted April 20, 2013 Author Posted April 20, 2013 Your script works great while the Lens QC windows are just named Lens QC. The name of the window actually comes from a calculation, which I think is where FM is failing to recognize. Window Name: "Lens QC" & " - " & assets::_description How would I implement your script to look for windows called "Lens QC" regardless of what asset description trails it? Would the Left function come in to play? Cheers!
Recommended Posts
This topic is 4234 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 accountSign in
Already have an account? Sign in here.
Sign In Now