Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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?

Posted

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.

Posted

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"

Posted

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

Posted

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.

This topic is 6356 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.