Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

mask SSN with floating field

Avatar

Avatar
Validate 1
Level 1
michaels9529850
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
michaels9529850
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
michaels9529850
Level 1

15-12-2018

On my form, I want to give the user the option to mask SSN. If checkbox = true, then only display last 4 digits of the SSN.  Then in the document, it will display value via a floating field.  I cannot figure out how to concatenate the mask and only display the last 4 digits of the SSN string.  The Display pattern for ParticipantSSN text box and floating field is text{999-99-9999}

In the checkbox mouseup event, I have this javascript:

var PSSN = ParticipantSSN.rawValue; // Length is 9

var mask = "XXX-XX-";

if(chkPredact.rawValue == false) {

fltParticipantSSN.rawValue = PSSN;

}else{

fltParticipantSSN.rawValue = concat(mask + slice(PSSN,6,4));

}

Thank you in advance

Mike

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 1
michaels9529850
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
michaels9529850
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
michaels9529850
Level 1

16-12-2018

var PSSN = ParticipantSSN.rawValue; // Length is 9

var mask = "XXX-XX-";

if(chkPredact.rawValue == false) {

fltParticipantSSN.rawValue = PSSN;

}else{

fltParticipantSSN.rawValue = mask + PSSN.substring(5,9);

}

Answers (0)