Concatinate a portion of two fields?

S

smonczka

I am making an employee form that combines the first letter of the
first name and the last name to create an email address for a new
employee. For example John (field1), Smith (field2) would equel
(e-mail address removed) (field3). Thanks to a responce from another user
in the group I now understand how to use Concat to add the field2 and
"@mycompany.com. But, using a formula how do I only pull out the
first letter of the first name. Is there something, like excels MID or
Left function in InfoPath.

Also is there a full list of discriptions of InfoPath Functions
somewhere on the Internet?

Thanks all for your help.

Steve
 
S

S.Y.M. Wong-A-Ton

For a full list of descriptions of functions, use InfoPath's help and search
on "About formulas and functions", or just click on the function name when
you are in the "Insert Function" dialog box and look at the description below
the list of functions.

To solve your challenge, use the following formula for field3:

concat(substring(field1, 1, 1), field2, "@mycompany.com")

To get letters in lower case, use the translate() function as demonstrated
in this solution:
http://enterprise-solutions.swits.net/infopath/convert-first-letter-word-upper-case.htm but then switch "ABC..." and "abc..." around.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top