Jump to content
Server Maintenance This Week. ×

Filesharing and Separation model


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

Recommended Posts

I have separated my application into UI files and data files. When the first user opens the main UI file and on startup that UI file opens all other UI files, does that user automatically become host to all the UI files and data files?

Link to comment
Share on other sites

  • 2 weeks later...

Thanks ... I have a further question ...

The original application (FM6) had explicit opens of all of the files (UI/data combined). I have now got a single UI and multiple data files, which are defined as TOs in the Database relationships.

Will these get opened automatically when the UI gets started?

Link to comment
Share on other sites

The data files wil get open if

1 - There is a sub-script pointing to these files

2 - If on the layout there is a portal field or a local calculation field that uses something from theses files (and then they will open with their default settings)

3 - If a permission calculation is using something from these files

this ofcourse relevant to FMP6....

Link to comment
Share on other sites

Pardon ... are you saying this does or does not apply to FM7? I have one UI file and about 6 data files. All of the data files are referenced somewhere in the UI ... but the UI has many layouts. What do I have to do to ensure that the data files get opened?

Link to comment
Share on other sites

The other files will open as needed under those conditions that xtrim has outlined, so in general, it is not necessary to explicitly open them.

However, in your case, since you're hosting with FM Client, you should explicitly open them so that connecting clients will be able to access those files even if the Host didn't have any immediate use for them. This can be easily done by having your startup script Open[] each external file. I'd probably try to make this a little more efficient by adding conditions:


If [ Get(MultiUserState) = 1 ]

  If [ position(DatabaseNames,"Data1",1,1) = 0 ]

    Open File [ Open hidden; Data1 ]

  End If

  If [ position(DatabaseNames,"Data2",1,1) = 0 ]

    Open File [ Open hidden; Data2 ]

  End If

  ...

End If

Link to comment
Share on other sites

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