Newbies mura Posted August 3, 2004 Newbies Posted August 3, 2004 Hi, I'm interested in showing the currently logged in user (account name) when connecting to a FMPro 7 db published via IWP on a particular layout. Here's what I've tried to do: - defined a field CurrentUser as a Container - defined a script Login with a line "Set Field [db::CurrentUser; Get (AccountName)]" - set File Options to run the script Login when opening the file I've tried putting the script on a button and executing it that way. Doesn't seem to work when connecting to the server IWP via a web browser. Everything, of course, works fine when connecting directly to the database locally--I haven't tried connecting over a network. (Not that I think it matters, but I'm use MacOS 10.3 and Safari 1.2.2.) I've also tried Get (UserName) with no luck, and setting the script with "Indicate Web Compatibility" and "Run Script with Full Access Privileges". Any suggestions? Thanks. Brandon
Newbies skumancer Posted August 3, 2004 Newbies Posted August 3, 2004 Well, if you want to show the username(set in the preferences) you put a text label and put thi || inside it...that posts the username in the text label. If you want to show the AccountName (from the user's account), then you have to do a script that says Set Field (db::username) = Get(AccountName) and set the script to the start script, thats all!!
Newbies mura Posted August 3, 2004 Author Newbies Posted August 3, 2004 skumancer, Thanks for the suggestion but I've tried that. (Meant to mention it in my post.) I try running the script you describe--which is identical to the one I listed--once the db is opened. But no luck there either. Any other suggestions?
Reed Posted August 20, 2004 Posted August 20, 2004 What about defining an unstored calc field with get(accountname). this works for me... Dana
Deep Thought II Posted September 1, 2004 Posted September 1, 2004 u can just put a text box and use the current user symbol to display on the layout as well, if u want to do it simple and quick.
ab4 Posted September 16, 2004 Posted September 16, 2004 Try creating a global field, under the Auto Entry Tab, select Creation and then select Account Name. If that don't work, let me know and I'll review my code. It took me forever to get that working but I did and will gladly share if above doesn't work.
Recommended Posts
This topic is 7642 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