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.

Populating field based on Account Name

Featured Replies

I am trying to create a script that will autofill a person's email address based on their user account name. I know I could do an if-then step in the script, but for 40 users that would be a lot. Is there a way to use the Set Field with a calculated result? What I imagined was this:

Get Accountname

If Accountname=bookkeeper set the field to [email protected]

If Accountname=purchasing set the field to [email protected].

Is it possible to do that in one calculated result?

Get(AccountName) & "@example.com"

I assume you are looking to set up an email address for your employees using their accountname as part of the address. e.g. [email protected].

If the account name is already their set up an auto enter calculation in the email address field:

Get(Accountname) &"@abc.com"

  • Author

Many are the same as the email address, but some are not. I had also intended on one that autofills the Title in another field and I thought I could use the same routine if it worked.

You should have a User (or Employee) table, where the Email address is stored, along with the Account Name. You can then use this on the child side of a relationship from a "CurrentUser" global or unstored calc in the local table to the Account Name in the User table. With the relationship established, you can reference the Email address (or whatever fields you wish) from the User table. The script can then grab the related Email field and insert it in the local record using Set Field[].

  • Author

So once I have that separate table created, I have the script compare the accountname to the Users table, then set the field from the related record?

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.