The Support Group Blog

Knowing when a user is logged in through Instant Web Publishing

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"]
Else
Go to Layout ["Regular Layout"]
End If

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.

Share this entry
0 replies
BrowseMode

Sign up to receive news and information about the FileMaker platform and other custom app development tools.

Keep me posted

Most Popular

Developer Resources

News, Tips & Tricks and Demos