From our Get ( Answers ) newsletter archives, updated for FileMaker 11:
We’ve been asked this many times, so it’s worthy of repeating: How can you tell if a user is logged in to a solution through Instant Web Publishing rather than through the FileMaker Pro client? The answer is to use the Get(ApplicationVersion) function.
For example, you might use an opening script to bring users to one of two layouts based on whether they were using IWP or not. If the user is connected to your server through the web client,
Get(ApplicationVersion) will return Web Publishing Engine 11.0v1 (for example); if using FileMaker Pro, it would be Pro 11.0v1.
If [PatternCount ( Get ( ApplicationVersion ) ; "Web" ) > 0]
Go to Layout ["Web Layout"]
Go to Layout ["Regular Layout"]
You can also use this function to make sure users are logging in with a minimum version number: if you’re using script triggers, for example, make sure to test for
GetAsNumber(Get(ApplicationVersion)) ≥ 10.