September 17, 201114 yr 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?
September 17, 201114 yr 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.
September 17, 201114 yr 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
September 17, 201114 yr 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
September 18, 201114 yr 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"
August 10, 201213 yr 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...
August 26, 201411 yr 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
December 12, 201411 yr 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