August 3, 200421 yr Newbies 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
August 3, 200421 yr Newbies 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!!
August 3, 200421 yr Author Newbies 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?
August 20, 200421 yr What about defining an unstored calc field with get(accountname). this works for me... Dana
September 1, 200421 yr 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.
September 16, 200421 yr 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.
Create an account or sign in to comment