Last four of SSN

christopherp183

12-11-2018

I need a little help on populating just the last four digits of a SSN elsewhere within my form.  In the form there is one subform which is collecting demographic information.  About 20 subforms down, there is a field which needs to populate just the last four digits of the SSN field which is located on the demographic page.  Can anyone help me out?

Accepted Solutions (0)

Answers (1)

Answers (1)

_Bruce_Robertson

MVP

12-11-2018

You probably want a calculate script on your second field, something like;

xfa.resolveNode("SSN[0]").isNull

     ? ""

     : '***-**-'+xfa.resolveNode("SSN[0]").rawValue.substr(-4)

You will need to change the "xfa.resolveNode("SSN[0]")" bits to reference your fields.