Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to tell FM if the client is IWP or not

Featured Replies

My file is accessed with both Filemaker and IWP.

According to the IWP user guideI need to do an 'Exit Application' script step, but only if the file is being accessed with IWP.

What is my IF statement?

I tried Get(ApplicationVersion)= ("Filemaker Web Publishing" or "Web Publishing Engine") but it's not working.

Get(ApplicationVersion) seems to give me the host application version on both the host and the IWP client.

I am testing it on the same machine I'm hosting it on if that could make a difference?

You are testing for the wrong string text. Please refer to the help system on Get(ApplicationVersion) - there is a list of possible results. You must test against those results.

I use a customer function I created, but you can also use this in your script:

Case(PatternCount ( Get ( ApplicationVersion );"Web") ≥ 1;"Web";

PatternCount ( Get ( ApplicationVersion );"Server") ≥ 1;"Server";PatternCount ( Get ( ApplicationVersion );"Go") ≥ 1;"Mobile";"Client")

This will return "Web" if it is IWP.

Thanks,

C

  • Author

OK so I see that I need to look for the word "web" because of the inclusion of the version, but

Get(ApplicationVersion) returns "Filemaker Advanced 11.04" in both my Filemaker and IWP access of the file.

Christine's function (thanks Christine) returns "client" in both cases

  • Author

OK once the script is run in IWP it works.

Thank you both.

Get(ApplicationVersion) returns "Filemaker Advanced 11.04" in both my Filemaker and IWP access of the file.

Are you sure? It should be "ProAdvanced 11.0v4"

  • 10 months later...
  • Newbies

I wish someone had answered this topic. This is exactly the same problem I'm having, and nobody seems to have understood the problem. No matter whether I access my file on my Filemaker 12 client or on the web, Get(ApplicationVersion) returns "ProAdvanced 12.0v1" or whatever it is.

This makes it impossible for me to know whether my client is using IWP to send them to a different layout.

I just don't get it.

Any help on using this function would be greatly appreciated. I've added a field with the get function to easily see what it's returning, and it's the same no matter how I access the file...

  • Newbies

I worked it out. Had to turn off storage for the calculated result.

  • 2 years later...
  • Newbies

are you sure your syntax is correct?

 

I use a customer function I created, but you can also use this in your script:
Case(PatternCount ( Get ( ApplicationVersion );"Web") ≥ 1;"Web";  

 

Shouldn't that be 'PatternCount ( Get ( ApplicationVersion );"Web") ≥ 1'                              - where does the extra ;"Web" at the end come from?

 

I am trying to write a script that works and this is failing for me.

 

if[PatternCount(Get(ApplicationVersion);"Web")]   ----- should be true for IWP Clients

    Go To Layout ["Main" (Main)]                                  ------ which is my classic layout

End If

 

Loop

… etc…code for fancy layouts

End Loop

 

IWP Clients go to the default classic layout since it is first in creation order, but I have other code in this script that IWP runs into throwing an error in my server logs.  Doesn't kill the server or anything, I just don't like my logs having this issue.  The other code is a loop that runs for the FMP Clients and uses non-classic layouts which IWP does not like

  • 3 months later...

Years late, but

 

Get(ApplicationVersion) = ("Filemaker Web Publishing" or "Web Publishing Engine")

 

This would always be false anyway.  The ("Filemaker Web Publishing" or "Web Publishing Engine") is an expression on its own, and would equate to 0.  You are basically asking if Get(ApplicationVersion) = 0.  That is, unless you were just giving us a loose example of what you were trying to do.  :-)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.