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