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

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

Recommended Posts

Posted

Looking for advice on what script steps I should include in a close file(s) script.

I have attached two screenshots:

1. close_script_main

2. close_script_subscript

I want to attach this script to all layout in all files that have the word "LOG OUT" on the button.

I have over a dozen files, over a couple of hundred layouts and would like one script.

The subscript includes most of the files in the system, however, I do not want to have to always edit the list of files. Is there an equivalent "close ALL files" script step?

Not all of these files would be open, but in some cases they would be.

Also, should I have an EXIT APPLCIATION step at the very end? If someone is logging out - they have no need to be in FileMaker. They could always restart the program if they wanted to develop - but this is not my concern. I want to make sure that I have placed the correct steps to log a user out.

Lastly, just for clarity...

Does the "close file" only apply to the User who activates that script?

In other words, 3 people are in the system; 1 person activates the script and closes "their" session, not the others?

_close_script_main.jpg

_close_script_subscript.jpg

Posted

should I have an EXIT APPLCIATION step at the very end?

No... please, no. There is nothing worse than closing a file and have the whole application quit... ending all the other work I've been doing. (How would you feel if quitting FMP shut down the computer for you without asking?) Users know the difference between closing a file and exiting the application, let them decide.

It's a sign that the developer assumes that THEIR database is the only one the person will be using. I hate that.

I want to attach this script to all layout in all files that have the word "LOG OUT" on the button.

Shouldn't this be a CLOSE button, not LOG OUT?

The subscript includes most of the files in the system, however, I do not want to have to always edit the list of files. Is there an equivalent "close ALL files" script step?

As related files are needed FileMaker will open them as hidden windows (which is sort-of not opening them, really). FileMaker will automatically close all of the hidden files when they are not needed any more, which is usually when the "main" window is closed.

I think you don't really need to be worrying about this at all.

Posted

There's no simple step to close all files. You're on the right track.

However, if you exit application it will close all the files anyway, so there'd be no need to close them all individually.

And no, closing a file doesn't close it for anyone but the current user. (Not making fun of your question, but LOL! That would be something, wouldn't it?)

Posted

I don't think it's that unusual, Vaughan. Sometimes the solution in question is the only one FileMaker is used for.

And more often the related files are not hidden, that's only true when all the interface is done in one main file.

I agree that it's a pain for a developer. What I usually do when I work on systems like that is throw something like this into the script:

If( Get(PrivilegeSetName) <> ["Full Access]")

Exit Application

...

Posted

"I don't think it's that unusual, Vaughan. Sometimes the solution in question is the only one FileMaker is used for."

It's a common assumption, but it's very short-sighted.

I'm presently implementing a $200K solution that started before my time. If the user tries to open it without the correct plugins installed, it quits the FMP application. Never mind that they have other files open... bang, they're out. It's bad programming, and lazy in the *worst* sense. Why didn't they try to update the plug-in from the server?

When I asked the developers about this (and other UI disasters like hiding the File and Window menus so users cannot open other files or switch to existing windows) the Developers admitted that they had never, ever in the fours years of development taken the time to watch somebody use the system. Had they done so they'd have noticed that theirs is NOT the only solution in existence, and people need to use other files to do their job. Sheesh, is it that hard to imagine?

Sorry for the rant. It was (is) just so painful watching each and every user find themselves locked out of their files with the only option to quit and start again.

I can only be grateful that FMP does not have a "Shut Down Computer [ no dialog ]" script step. After all, how many users ONLY use their computer to use the FM solution you've made?

Posted

Thank you both for your input. I have been (still am) sleep deprived and I have no doubt that my question was hobbled to some degree. I am glad you both are able to read through to what I am getting at.

Hi Vaughn, I have been trying to "standardize" interface language as much as possible - and find myself going back and forth on some terms, such as: close, log out, exit, etc.

I settled on "Log Out" for reasons that seemed reasonable to me at the time. I want to convey that "Log Out" means the User is shutting down their session and would have to enter credentials if they wanted to come back in. This leads me to speculate that you are seeing an anamoly with my language if I am inquiring about a "close" script.

So, if I revise my script to include one button throughout the solution (many layouts) that have the term "Log Out" then I never have to define an "Exit" application button IF I revise my script to include the "Log Out", "Exit", or "Cancel" buttons in the dialogue that appears when the script is run. I think this may be a clean way to do this and give the User the choice of what is going to happen. Opinion on this line of thinking?

As for the question I originally posted, a simple answer to what I asked - is not so simple for me because I have to think about what might happen and how to address it in the script. That is quite an exercise for me. Couple all of the new "things" I am reading here and there and it makes me doubt a lot of the scripts I have. Have I trapped for errors, where do I trap, did I anticipate this or that ... get's mind numbing for me. Hence - the reason for my post.

So my strategy is to try and remember or account for what I think I need; build the script; test it; then post it for anyone to tear it up - or to give a little advice.

I have already revised the script - based on the comments you both provided. I included another IF condition to hopefully account for whether to "close", "exit", or cancel.

When I get it finished - I will post and your future comments would be appreciated.

Thanks,

David

Posted

Hi Fitch,

I think I am going through a "period" in which I am doubting A LOT. I am glad I got a chuckle out of you - I am laughing now after I read the way you phrased it. I clearly am in a state of mind that I am reversing progress.

And by the way, if I use a "Go to layout" script for a button...

drumroll please...

Does everyone who is in the solution go to the same layout at the same time when one user hits the button?

Just kidding. I need a vacation.

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