I have a DB that is stored locally (on a Mac, in case it's OS specific ) and it includes a script to export records. The export record command doesn't build a filePath, it creates a file name.
When the DB is opened by double-clicking on the file or by using any of the menu commands it behaves in this way:
- The title of the window is the file name.
- The exported data is placed beside the DB in the file system.
When the DB is opened by a URL it behaves in this way:
- The title of the window is the folder path and the file name
- The exported data is placed in the Documents Folder
The Export Records documentation says that the Documents folder will be used as the default location for exported data when the file is hosted and there is not an absolute path.
What I get from this is that the DB is being opened with different settings when it is opened using a URL. It behaves as if it is being hosted, instead of running as a local file with a single user.
I'm looking for a way to know (aside from the window title, which can easily be changed) whether the current DB is being "hosted."
Get(HostIPAddress) returns empty and Get(MultiUserState) returns zero. That suggests the DB is not being "hosted" in the special sense of the word but the Export Records function behaves as if it is being hosted.
What other methods can be used to determine whether the file is being hosted?
Has anyone else noticed this difference in behaviour being triggered when opening a file from a URL?
Since we got many multi-file - solutions to maintain, I got a separat file for dealing with accounts (and much more). Under macOS and under Windows
That file has
- one record for every file of the solution
- lets every individual file open (by url) with one click. Very handy with files that hide after the first window opens (under Windows, I got never all files in the 'windows-list')
- lets add user, change users (pwd), delete users, etc. using simple scripts in each individual file and one somewhat longer script in the 'central - file'
I do not have problems with open url, wether with local files nor with served files, window-names contain the filename
I also have 'Starters' for opening solutions, Starter-files are in a Folder in the dock (macOS) - written in xojo (Yes, overkill - but keeps me a bit working on xojo) and all open the specific solution via url
As long as the url is correct, works perfect
With local files (fmp18://~...), the files need to be in the documents folder, means I can have only one solution with the same file names at a time. We got solutions to work on with 50...150 files; partly old solutions, partly solutions with quite some individual sub-solutions that have nothing in common (many departments in one company)
the window name is the same, contains the name of the file, locally and hosted (the hosted one has the server-name after the filename)
The local solution must be in the documents folder, no subdirectories
Exporting.. I do manual exports, so I have to specify the export-file
You can get Server data using the Get(HostApplicationVersion) function - or via the servername after the filename
The local file I am using is stored in a subdirectory. Moving the database into the Documents folder simply means that scenario A and scenario B both produce the same result.
Ouch. Ouch. Just tried this with FMP19 and the Open URL script returns error 100. If I move the file to the Documents folder it opens - even when the full path is to a subfolder of the Documents folder. Mamma mia.
I found some hints somewhere indicating that subdirectories are somewhat difficult. I have mostly a server - but for local work, I put all files directly into 'documents', that works perfect here (window names ok, etc.)
I'm using fm16 and fm18 (fmp:// and fmp18://). I believe that I made some tests with 19, but since no customer is on 19 as of today, all solutions here are v16 or v18
I've never had difficulty with sub-folders until this morning. My first
trial of v19.
The paths to databases are local to Documents. So a databases stored in
in /Users/USER/Documents/Projects/ is referenced as
I've sent Claris a report through the Product Issue area of the
community web site.