Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Simple Script to get related field

Featured Replies

I want a simple script that will get the users name from the from FileMaker, then go to a table I created (Users) and get the the value of the id field that has the same user name (a copy of the user name is stored in the Users table). That should be easy, right?

What about a good reference (book, website) just for scripting? I have "The missing manual", but I'm guessing that there's something better for scripting.

The simple answer is the function Get ( AccountName ). That's the name they logged in as. Whether that matches the User name in your file I wouldn't know. But the above is the best way to identify a person. There is also Get ( UserName ), but that is unreliable. In fact, this is what FileMaker Help says about it.

Important: For greater security, use Get(AccountName) to track and manage user access: a user cannot change the account name used to log in to a database file.
  • Author

Thanks for the answer, but I should have been more specific. I am aware of the GET function, but how do I match the result of the GET to the proper field in my table?

In a script that runs on Open, go to a layout based on a table occurrence of your Users table and Find the record that matches the Get(AccountName). Now you have the user record and his UserID. I usually set $$UserID so I have it handy all session.

  • Author

That's the ticket! Thanks!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.