Hide Numbers in velocity Scripting | Community
Skip to main content
New Participant
October 25, 2019
Solved

Hide Numbers in velocity Scripting

  • October 25, 2019
  • 1 reply
  • 5465 views

Hi,

I am looking to send out a communication via Text and Email to our customers that includes that persons policy number. Unfortunately our legal department will not let us send the entire policy number digitally. We are permitted to send the last 4 digits however. Is there a way with Velocity Scripting where I'd be able to null out the first 7 or 8 digits of this persons number?

Example - A persons policy number is 077063253. With Velocity Scripting can I get it to show as XXXXX3253, or is there another way where I can change the data value to a new field to only include the last 4 digits where 077063253 is changed to 3253 on a different field?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman
${lead.PolicyNumber.replaceAll(".(?=.{4,}$)","X")}

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
October 25, 2019
${lead.PolicyNumber.replaceAll(".(?=.{4,}$)","X")}
walsjamAuthor
New Participant
October 25, 2019

Thank You very much Sanford, this worked!

SanfordWhiteman
New Participant
October 25, 2019

Great, I also edited to be less verbose just now.