January 20, 201015 yr So I got my nifty little IWP login scheme cookin' along and I'm watching the FMS Admin Console show me cool information like Client Version (i.e. Safari 3.1, Internet Explorer 8.0) and IP Address (which naturally reports the client's public IP address). I am already recording logins and password changes, and I'd like to record this extra metadata. I've tried using these functions, which we're all probably familiar with in the FileMaker Pro context, but appear not to work with IWP: Get(SystemIPAddress) This seems to report the server's IP address, which is not very helpful. Get(SystemPlatform) and Get(SystemVersion) These also appear to report the server's platform and version, which is not very helpful. Get(ApplicationVersion) I think it would have made a lot of sense to report the browser information (much like "User Agent" in web design world) but it always seems to report something like "Web Publishing Engine 10.0.v2", which is not very helpful. So is there any way to pull that kind of info into a script from my IWP sessions?
January 21, 201015 yr As for the Get functions you mentioned, they work as advertised. For the Get(ApplicationVersion) function, FM's Help lists the 5 possible results. But I think the most-likely explanation is they're not being "refreshed" one way or another, and it probably depends on how you've structured your login schema. Under calculated fields, the problem could be ... (1) if your fields are Global, they're probably not refreshing as hoped. The data you see may be leftover from your last session as a local user. You could script a means to set or refresh them. (2) if your fields are discrete, you may be seeing data from the first record ... try creating a new record during your IWP session. (3) if the field is Stored, try changing it to Unstored, if only to verify it works. Alternatively, using these functions under Scripting should avoid all such problems. Try setting some Global Script Variables at login to make sure they work. Those GSVs could be used to set your "metadata" fields.
January 21, 201015 yr Author Well, the thing is I am trying to pull it in via scripts. Here's what the script looks like: Set Error Capture [ On ] #Convert script parameter to variable(s) Set Variable [ $contact_id; Value:GetValue(Get(ScriptParameter); 1) ] Set Variable [ $description; Value:GetValue(Get(ScriptParameter); 2) ] #Go to action log layout Go to Layout [ “OWN—Contact Web Account Log” (OWN—contact_web_account_log) ] #Record new action New Record/Request Set Field [ OWN—contact_web_account_log::contact_id; $contact_id ] Set Field [ OWN—contact_web_account_log::description; $description ] If [ PatternCount(Get(ApplicationVersion); "Web") ] #Record client metadata Set Field [ OWN—contact_web_account_log::ip_address; Get(SystemIPAddress)] Set Field [ OWN—contact_web_account_log::system_platform; ] Set Field [ OWN—contact_web_account_log::browser; Get(ApplicationVersion)] End If #Go to original layout Go to Layout [ original layout ] I just tested it and the IP address is absolutely recording the server's local IP address.
January 22, 201015 yr Well, that's odd. Nothing in your script leaps out at me. (Thanks for posting it.) By any chance, are you in Find Mode when your script is triggered?
January 23, 201015 yr Author The script I posted above is called from several places, and even though I don't explicitly Enter Browse Mode (even though I probably should), it always is in browse mode because I can see the records popup in my FMPro Advanced window while I'm working in my web browser. I gotta believe I'm doing everything right, it's just that these functions don't work as expected (with the exception, I suppose, of Get(ApplicationVersion)) in IWP.
June 26, 201114 yr Newbies The script I posted above is called from several places, and even though I don't explicitly Enter Browse Mode (even though I probably should), it always is in browse mode because I can see the records popup in my FMPro Advanced window while I'm working in my web browser. I gotta believe I'm doing everything right, it's just that these functions don't work as expected (with the exception, I suppose, of Get(ApplicationVersion)) in IWP. Hi HazMatt, did you ever find a solution to this? I have the same problem - I want to identify which computer is accessing my file through IWB. But all the functions just give me the server info. How do I identify the client? I want to know which computer created a record in my database.
June 26, 201114 yr Author Hi HazMatt, did you ever find a solution to this? I have the same problem - I want to identify which computer is accessing my file through IWB. But all the functions just give me the server info. How do I identify the client? I want to know which computer created a record in my database. No, nothing has changed since my last posts. FileMaker Server 11.0.3.309 (the latest as of this post) still returns the host IP address for Get(SystemIPAddress).
Create an account or sign in to comment