Tips and Tricks: How do I remove the special characters from the phone numbers?

How do I remove the special characters from the phone numbers?

A client was working on a scheduled report to push applicant data to their new Student Database.  The database did not allow anything besides numbers in the phone field.

I created a new field called PHONE_EXPORT and created a "Set Field By Script" Trigger.  This is because we want to preserve the original value of PHONE for your users.

Event: Manual

Description: Clean PHONE for Export

  • Not conditional - we want this value to update whenever PHONE changes.
  • Set Field: PHONE_EXPORT
  • a["PHONE"].replace(/[.,\/#+ !$%\^&\*;:{}=\-_`~()]/g,"");
  • [ ] Set on Profile also (optional)

Execute Manually once, check the results, Then Change to Event: Save

Any feedback?  

 

0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post