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

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

Recommended Posts

Posted

Hi

I was wondering if there was a way of making sure a file was hosted before a script would be allowed to run.

People take copies of the system and certain script should only be run on live data, not the local copy.

I hope this makes sense.

Thanks in advance.

Orlando

Posted (edited)

Hi, Straggler!

You can say to users be disable from network before using local copy. Script uses only opened local copy.

Or dont alow them copy file from host.

Edited by Guest
Posted

Have you tried the Get (FilePath) function? This will return a file path in the format fmnet:/networkaddress/databaseName for hosted files. Use the PatternCount function to check for 'fmnet' and you will be able to specify dynamically whether or not to allow the script to run.

Hope this helps.

Posted

I was wondering if there was a way of making sure a file was hosted before a script would be allowed to run.

People take copies of the system and certain script should only be run on live data, not the local copy.

Yes to the basic question, but what is going on here? What do you mean that "...people take copies..." of the file? They should not be able physically to access the files at all. Doing so can damage them.

Steven

Posted

Thanks for all your replies and suggestions, very helpfull.

Yes to the basic question, but what is going on here? What do you mean that "...people take copies..." of the file? They should not be able physically to access the files at all. Doing so can damage them.

Steven

Steven, what we have is a live hosted system. At the end of the month we make copies of certain files and they are used to run reports, after this the file is discarded.

What I want to be able to do is halt a script if the file is not run from the server, as the script updates other files and I do not want it updating with out of date data.

Will try out a couple of these suggestions and see which one works best.

Thanks again.

Posted

Why don't you run the reports while the files are hosted rather than taking them down first?

Meanwhile maybe check out the Get(MultiUserState) function tat returns information on the hosted status of a file:

Description

Returns a number representing the level of sharing for the database file using FileMaker Network.

Returns:

0 when network sharing is off.

1 when network sharing is on, you're accessing the database file from the host computer, and either all users or a specific group of users (based on their privilege set) have network access to the database file.

2 when network sharing is on, you're accessing the database file from a client computer, and either all users or a specific group of users (based on their privilege set) have network access to the database file.

Steven

Posted

Old Advance Man.

I have had a look at the Get(MultiUserState)and this might be what I need, maybe use this with one of the otehr functions to make it more robust.

Thanks for everyones help.

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