Jump 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.

Featured Replies

I hope I'm putting this in the correct forum location.

I'd like to have a welcome message that says Hello (user). I have account names set up so that users can see only records they have created using the get(AccountName) command. In my employee table I have account name and first name.

I'd like the welcome message to get the account name to find out who the user is and then use the first name field from the employee table.

Is this possible?

Thanks!

Edited by Guest
The Topic: <a href="http://fmforums.com/forum/showtopic.php?tid/216202">Custom Welcome Message</a> was moved from <a href="http://fmforums.com/forum/showforum.php?fid/267">Script Triggers</a> to <a href="http://fmforums.com/forum/showforum.php?fid/36">Ma

  • Author

I may have started to figure a way to do this.

I have a table called employees with fields name_first and username among others.

On my welcome message I have a portal that shows only the first name from the employees table. I filtered the results to show only those records where username = Get(AccountName)

The problem is that it isn't working.

Am I on the right track?

In a script that is set to run on File>Open, start off with a Find in the Employee table:

Go to Layout Employee

Enter Find Mode

Set Field AccountName to Get (AccountName)

Perform Find

If Get(foundcount)=1

Set Field gEmployeeName to Employee:NameFull

Else

Error, more than one or none found, do something

EndIf

Now you have their name in a global and can place that field anywhere without using a relationship.

  • Author

Thanks for the response.

I'm new to scripts. Is there a way I can copy and paste what you have there? Or do I have to go through and make a script step by step?

No, you cannot copy/paste (I wrote that is pseudo-script).

Give it a try.

  • Author

I having a problem with this part. Here is what I have.

Get(foundcount)=1

[color:blue]Set Field gEmployeeName to employees::name_first

Else

Error, more than one or none found

It says the specified table cannot be found (highlighting the blue area above)

Do I have to have a gEmployeeName field already in a table?

Yes.

My example assumes also that in your Employee table you have AccountName, Name_First, Name_Last and the calc field, Name_Full. Name_Full = Name_First & " " & Name_Last

gEmployeeName is a global text field. I usually have a table devoted to all prefs and globals. It is a one record table.

AccountName MUST be unique. So, if the script finds more than one--you've somehow entered two people with the same account name. You'll probably add a Show Dialog here, "Contact the Admin."

Create an account or sign in to comment

Important Information

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

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.