Expand my Community achievements bar.

Don’t miss the Workfront AMA: System Smarts & Strategic Starts! Ask your questions about keeping Workfront running smoothly, planning enhancements, reporting, or adoption, and get practical insights from Adobe experts.

Format phone number in a report

Avatar

Level 3

I'd like to have a user's phone number format as (xxx) xxx-xxxx in a report.

I tried the suggested text mode below, but it returns only 7 out of 10 numbers. it's missing the middle three numbers.

valueformat=HTML
textmode=true
valuefield=phoneNumber
valueexpression=IF(ISBLANK({phoneNumber}),"",CONCAT("(",LEFT({phoneNumber},3),") ",MID({phoneNumber},4,3),"-",RIGHT({phoneNumber},4)))

 

Any ideas what I'm doing wrong?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Level 2

My guess is the MID function is not available. I replaced it with this:

LEFT(RIGHT({phoneNumber},7),3)

 This pulls the right 7 digits (removing the area code) and then grabs the left 3 digits of that result. This worked for me in a quick test. 

Full expression: 

valueexpression=IF(ISBLANK({phoneNumber}),"",CONCAT("(",LEFT({phoneNumber},3),") ",LEFT(RIGHT({phoneNumber},7),3),"-",RIGHT({phoneNumber},4)))