function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
cldavecldave 

Workflow Task: Update Field using a formula

I'm trying to populate a custom email  field on leads by combining the values of the standard fax field and adding "@smartfax.com"

 

Results would be: 1+fax#@smartfax.com

 

it's just i have no idea how to formulate this formula in the workflow update field formula editor? or any other way?

 

Thanks in advance.

Message Edited by cldave on 03-10-2010 12:08 PM
Best Answer chosen by Admin (Salesforce Developers) 
tstrongtstrong

That example worked beautifully.  Here's the code:

 

"1" & MID(Fax,2, 3) & MID(Fax ,7,3) & MID(Fax ,11,4) & "@smartfax.com"

 

Just replace your fax field in the "Fax" one above.

All Answers

tstrongtstrong

The formula should just be:  Fax_field__c & "@smartfax.com"

cldavecldave

Thank you for quick answer, that did work but it cause a problem:

 

here's an example of what got populated:

 

is it possible to have the fax # converted to simple numbers and not in phone format (with no paranthese or dashes), and have a 1 in front of it?
Here how i would like it to appear:
Thank you again
tstrongtstrong

Try this:

 

1 & TEXT(Fax_field__c) & "@smartfax.com"

tstrongtstrong

Sorry, that won't work since you can only use TEXT on a picklist, number or date field.  Since it is coming back as text, try using FIND and SUBSTITUTE functions.

 

Example:  SUBSTITUTE(Email, LEFT(Email, FIND("@", Email)), "www.") finds the location of the @ sign in a person's email address to determine the length of text to replace with a “www.” as a means of deriving their website address. 

cldavecldave

Thanx, but i'm having some problem still, what you told me sounded like chines at first, than i start playing around, got to a partial formula but i can't seem to have it work

 

SUBSTITUTE(Fax, LEFT(Fax, FIND("(", Fax)), "1")

 

so i figured this take out the left paranthese "(" but how do i do that again with the right paranthese, the space between area code and phone # and the dash and Add the @smartfax at the end

 

ex: (866) 123-4567

 

If you could write the formula for me i would really appreciate it (as you can see it is not my forte ;-) 

 

 

 

p.s i found this on the help on formula, tried it but did not work for me

 

Unformatted Phone Number

This formula removes the parentheses and dash characters from North American phone numbers.

This is necessary for some auto-dialer software.

IF(Country_Code__c = "1", MID( Phone ,2, 3) & MID(Phone,7,3) &

MID(Phone,11,4), Phone)

 

maybe that is the solution but i gives me an error when i put it in

tstrongtstrong

That example worked beautifully.  Here's the code:

 

"1" & MID(Fax,2, 3) & MID(Fax ,7,3) & MID(Fax ,11,4) & "@smartfax.com"

 

Just replace your fax field in the "Fax" one above.

This was selected as the best answer
cldavecldave

ty vm Strong it worked!!!

 

I rellay appreciate your help

 

:-)

tstrongtstrong
No problem, glad to help.