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.

Convert Name to Email

Featured Replies

Hi everyone...I'm trying to convert an employees name and ID number to email format. The only part I'm getting stuck on is the employees name. Payroll provides it electronically as one field as such:

LAST,FIRST MI,

Our email is configured as [email protected]

(where "F" is the first initial of the first name and "L" is the first initial of last name and 1234 is a 4 or 5 digit ID number unique to the employee).

So I need to somehow take the L and F (using the example above) and place it in a calculation.

Does anyone have any ideas on how to do this?

The comma is a word separator, as is the space. Read up on FMP's LeftWords, MiddleWords and RightWords text functions.

As long as the text supplied by payroll is *always* in that format you should be OK.

Thanks Vaughn for the hint. I've been playing with this thing for over 4 hours. I'm terrible with text functions. (Didn't know that until today.) :

Here's what I came up with. Hope it helps you AlanP.

Left(MiddleWords (FullName ; 2 ; 1 );1) & ContactID & Left (FullName; 1) & "@abc.com"

  • Author

I'm crying with happiness! LOL : Thank you both for your help and thank you aldipalo for providing the code as my mind is numb from trying to figure this out for too long :D

It looks good.

My only suggestion, since I'm hopelessly risk-averse, is to introduce you to the Trim( ) function, which is built-in FMP, and the Trim4( ) custom function by Ray Cologon, found on Brian Dunning's web site.

Trim( ) strips leading and trailing spaces, which are quite commonly added by data entry people.

Trim4( ) removes leading and trailing spaces, non-breaking spaces, tabs and carriage returns.

I include Trim4( ) in all text handling functions to clean up the input.

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.