Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Last four of SSN

Avatar

Level 1

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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.