Jump to content

This topic is 7443 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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
Posted

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
Posted

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?

  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...
Posted

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.

This topic is 7443 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.