is there s simple way on determing if a database file is running on the FM-server or a local backup copy is running?
If you're at the computer, the server will show up in parentheses in the title bar.
If you want a script to make a determination, then you can use Get(HostName).
Not sure I understand the question but I think you're asking how to tell whether a file you have open in FMP is local or hosted?
If so, get ( filepath ).
Get ( HostName ) will just give you the computer name if you are on a local file.
Your point being?
If you can't parse the host name for the local computer, you can always use:
Get ( ApplicationVersion ) ≠ Get ( HostApplicationVersion )
The FileMaker Server name might NOT show in the window title depending on if and how the script step...
Set Window Title
Get(HostApplicationVersion)... https://www.filemaker.com/help/15/fmp/en/index.html#page/FMP_Help%2Fget-hostapplicationversion.html%23 ...says "If the current file is not shared or hosted , this function returns an empty string. Also returns an empty string when used from the host computer itself." Perhaps: IsEmpty ( Get ( HostApplicationVersion ) ) Tony White http://twdesigns.com/filemaker-14-functions-list/ http://FileMaker-Fanatics.com
It is an exception to take into consideration.
Yes, that would work too.
Of course, Get ( ApplicationVersion ) would then not equal Get ( HostApplicationVersion ), and the original still works, right?
FileMaker Pro 15 Help
Correction: That wouldn't work. (Brain cramp.) It would always be not equal. So you'd need to look for the IsEmpty result.
Lightly tested...seems to work...
PatternCount ( Get ( HostApplicationVersion ) ; "Server" ) ; "Hosted by Server" ;
PatternCount ( Get ( HostApplicationVersion ) ; "Pro" ) ; "Hosted by Pro" ;
Thanks, Tony! I just had a 'wha?' moment. Local = not hosted?
Retrieving data ...