July 20, 200619 yr I do most of my scripting with ASP and just populate fields back in filemaker at the end. To fire these scripts I attach it to a button that simply uses Open URL and attaches any values from Filemaker I need as querystrings to the URL. Is there a variable for current user I can use to also attach the current user's name as a querystring value with the URL? Any info would be greatly appreciated. Thanks!
July 20, 200619 yr get(accountname) You're in FM right? And you're sending FM data in the URL to your ASP pages, correct? Then that should work. As an aside: are you using the old ASP or ASP.NET?
July 20, 200619 yr Author That actually returned the username that I've logged into Filemaker with, which in this case is admin. What I need is the value of User name that you put into the Preferences in Filemaker. Right now my actual name is there. That's the value I need.
July 26, 200619 yr a username is stored in the windows registry. The following is a windows script that sets the username for filemaker 8 (will need to be adjusted for other versions) Just copy the following text to any text editer and save as "yourfilename.vbs". Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.RegWrite ("HKEY_CURRENT_USERSoftwareFileMakerFileMaker Pro8.0PreferencesUser Name"),WScript.Arguments(0),"REG_SZ" WshShell.Popup "Your Username has been set to " + WScript.Arguments(0),10 this can be run from filemaker using a send event. Do it by calculation where the calulation is: "C:yourpathyourfilename.vbs " & Quote (FieldValue or Variable you define) this will set the username to whatever you define but filemaker will not reconize the change until the next time filemaker is opened. Edited July 26, 200619 yr by Guest
July 27, 200619 yr this will set the username to whatever you define but filemaker will not reconize the change until the next time filemaker is opened. 2 ways around that: - make a similar VBscript part of the Windodws logon script. instead of taking an argument, have it read the current Windows user name. (This is great for Terminal Services deployments for instance) or - make a pseudo filemaker shortcut that actually launches a VBscript instead of FM. The VBscript reads the Windows user name, writes it to the registry and then launches filemaker
Create an account or sign in to comment