Jump to content
Server Maintenance This Week. ×

How to tell FM if the client is IWP or not


This topic is 3430 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 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...

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

  • 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.  :-)

Link to comment
Share on other sites

This topic is 3430 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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