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

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

Recommended Posts

Posted

How do I keep anyone from accessing certain files? I'm using 7 Developer and have 12 external files. I need to accomplish two things In a Run Time solution.

1. I want only the [Main] file to be able to open by double clicking.

2. When the [Main} file is open. If you go under "Window" on the menu bar and pull down to "Show Window" you can open another file. How do you stop that? I mean it makes little sense to stop the double clicking if they can open the files another way. I only want files to open by clicking a button in the [Main] file. Some files are data only files and it is never necessary to access them directly.

Thanks for your help,

Bill

Posted

Supposing that the other files are needed and/or necessary -

There's no way to "hide" them from the Window selection, unless you use a plug-in like Secure FM from New Millennium.

However, use this trick that I've used in the past. For each file that you don't want the users to "see", have only ONE layout visible in the layout menu. Make this layout a plain colored background (like grey) with a single "return" button that when clicked, will go back to the layout you want them to be in (the Main file).

This way, if they do happen to "stray" trying to view other files, all they'll see is a return button.

As another measure, in case they try to just open up another file, set the startup of the file (as defined in the Document Preferences in FM6) to run a "startup" script. This script will check to see if the Main file is already opened. If not, run the startup script in Main, or close the file altogether. Make sure to make this 'Allow User Abort [Off]' just in case they try to be funny and cancel the script while or before it starts.

Posted

Hi Brent,

Thanks for your post. I thought that may be the case and thought maybe there was another way to handle it. Thanks for your help.

Bill

Posted

An additional method to ensure that users go through the main file is to create a global flag field in each file. Then, when the main file is open have it set that field in each secondary file to some value.

As part of the open script in each secondary file, have it check to see if the flag field has been set to the specified value. If not, then it would run the open script in the main file. That way, no matter which file the user double-clicks, the main file opener script will be triggered and your solution will open as intended. Here's a simple example for the secondary files:

If Isempty [flag field]

Perform script [external, Main_File] [Open script]

Else

(any other sript steps to run)

Endif

You would also need to clear that flag field as part of the close script when the file is closed so it is blank when the file is opened.

Along with the suggestion from Brent, it will be hard for your users to go astray.

  • 2 weeks later...
Posted

Hi Dykstrl,

Great addation to my solution. If you don't want direct access to a file, why even let it open. Just have em go right to the file where you do want em! Very cool and I thank your for it.

Bill

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