Skip to main content
Participant
September 1, 2016
Answered

Partial Field Recognition

  • September 1, 2016
  • 1 reply
  • 287 views

I'm creating a document that requires the social security number of an employee. I'm using the special format category in the form field that's specific to the social security number. On another portion of the PDF, there is a field that requires only the last 4 numbers of the SS#. Can I create a field that pulls the numbers from the first field?

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer try67

Sure, that's possible. Let's say the first field is called "SSN". You can use this code as the custom calculation script of the second field:

event.value = this.getField("SSN").valueAsString.substr(-4);

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
September 1, 2016

Sure, that's possible. Let's say the first field is called "SSN". You can use this code as the custom calculation script of the second field:

event.value = this.getField("SSN").valueAsString.substr(-4);