Get HostPlatform

How can you find out if Filemaker Server is running on a Mac or on a Windows machine?
Because a container will only show a pdf when optimized for images on a Mac, and when optimized for interactive content in Windows, I was using Get ( SystemPlatform ) to hide the container that doesn't work.
However, if I log in to Filemaker Server running on a Mac from a Windows machine, I would need the version optimized for Mac (for images). I was hoping there was something like Get ( HostSystemPlatform ) to return that information, but I'm coming up blank.

1 Like

write script and call a sub script executed server sided via PSoS as follows:

If [
PatternCount ( Get ( ApplicationVersion ) ; "Server" ) ]

Exit Script [ Result: List ( Get ( SystemPlatform ) ; Get ( SystemVersion )) ]

Else

Perform Script on Server [ By name; Get ( ScriptName ) ] [ Wait for completion ]

Show Custom Dialog [ Title: "Host Info"; Message: Get ( ScriptResult ); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]

End If

1 Like

so Get ( HostSystemPlatfromFictional' ) could not be written with functions so you need to script it and keep test if file hosted by Windows in a global.

Does your file access from different servers at the same time or is it just one file hosted generically?

1 Like

@mtslights Are you saying that the FMS host OS is causing differences in the way that the FMP client handles content?

Two business are using it, one is hosting on a Mac with both Mac and Windows clients, one is hosting on a Windows machine with windows clients. I’d like to script it to work on any system rather than customize each one.

Yes, a pdf in a container will not show in Windows if optimized for images, and will not show in Mac OS if optimized for interactive content.
Depends on the server OS, not the client OS.
Pain in the butt, have put a lot of hours into scripting around something that should just work…

I understand that there are different behaviours between MacOS and WinOs that are annoying. I'm still not clear how the server OS is involved.

I don’t know WHY, but here’s HOW the server is involved. On FileMaker Server running on a Mac, it is the server that processes the contents of the container (a PDF file in this case). So even though the client is Windows, the field behaves as if it is on a Mac and the container settings have to be optimized for images in order to view or print the PDF in the container. So in order to hide the incorrectly optimized container (I have 2 copies, one optimized for Windows and the other for Mac), I need to know if the host is Windows or Mac (or Linux).