Rafita Posted October 25, 2007 Posted October 25, 2007 Hello! If a script contains a non-web-compatible step, FileMaker doesn't skip it and continue with the rest of the script, right? Instead, it just ignores it and doesn't do anything. But you need that step when you are in the network side. What "If..." statement can you use to address the script to the right way depending on where you are? Any suggestion will be highly appreciated.
Vaughan Posted October 26, 2007 Posted October 26, 2007 I think the Get( ApplicationVersion ) functions returns "web" for web clients. One of them does, look around.
Rafita Posted October 26, 2007 Author Posted October 26, 2007 That one gets "ProAdvanced 8.5v1" in both environments, not the "web" or "network" word that indicates how did you get into the database. I already have tried other funcions and no results. Besides, thinking again, I'm not sure a field can have two different values at the same time, right? Unless it is a global, that could handle a different value for each computer.
comment Posted October 26, 2007 Posted October 26, 2007 It seems you are not testing this correctly. Your test should run inside a script, something like: If [ PatternCount ( Get ( ApplicationVersion ) ; "Web") ] # Do web stuff Else # Do regular stuff End If
Rafita Posted October 29, 2007 Author Posted October 29, 2007 Yes, yes, yes! Sorry for my ignorance, but how the heck am I going to know that Get ( ApplicationVersion )could contain the words "web" or "network" in its guts, if the result (without PatternCount)of it is just the current version of FileMaker. I'm grateful, gentlemen.
comment Posted October 29, 2007 Posted October 29, 2007 PatternCount() does not look in any 'guts' - only in the text returned by the Get (ApplicationVersion) function. If the text itself didn't contain "Web", PatternCount() wouldn't find it.
Rafita Posted October 29, 2007 Author Posted October 29, 2007 So, what is the distinctive sign between the result of Get ( ApplicationVersion )in both platforms, in other words how can FileMaker recognize it, if the result of it (without PatternCount) is the same: only the FileMaker version, nothing else there?
comment Posted October 29, 2007 Posted October 29, 2007 how can FileMaker recognize it, if the result of it (without PatternCount) is the same It cannot. The thing is, the result is NOT the same. I'm not sure what works in IWP and what not (or if you're even using IWP), but I believe that if you define an unstored calculation field as = Get ( ApplicationVersion ) and put it on a layout, you'll see the difference.
Vaughan Posted October 29, 2007 Posted October 29, 2007 Rafita, read the manual and on-line help, it's all in there! From the FMP Help: -- Get(ApplicationVersion) function Returns text representing the FileMaker application and version. Pro (version) for FileMaker Pro. ProAdvanced (version) for FileMaker Pro Advanced. Runtime (version) for FileMaker Runtime. Web (version) for FileMaker Web Client. Server (version) for FileMaker Web Server. -- So the function will return true for web clients: Patterncount( Get( ApplicationVersion ) ; "Web" )
Rafita Posted October 29, 2007 Author Posted October 29, 2007 Well, I'm going to check the database from home via web, because I open it here from FM and from the web and the result is the same for both sides. It shows only: ProAdvanced 8.5v1 Maybe the server has to do something with it.
Rafita Posted October 30, 2007 Author Posted October 30, 2007 gWebNet = Get ( ApplicationVersion ) Calculation result: text Global storage (same result without Global storage)
comment Posted October 30, 2007 Posted October 30, 2007 Use either an UNSTORED calculation, or a script to set a text field to Get (ApplicationVersion).
Rafita Posted October 30, 2007 Author Posted October 30, 2007 That was the key: UNSTORED. Thanks for being patient, gentlemen and for enlighten me so I can can now close the parentheses. GBY
Recommended Posts
This topic is 6235 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 accountSign in
Already have an account? Sign in here.
Sign In Now