Dear community experts,
I have written a JS code to mask a SSN value in the DB that is working perfect at the power pages (portal) level, but the issue I have is that when I go to check the actual value in Dataverse it seems that is being saved with the XXX of the masking configured in the code and not the actual value entered, below the code, appreciated in advance any suggestion on how to fix this:
$(document).ready(function () {
SnnpMask();
});
SnnpMask = function()
{
$("#lts_patientsocialsecurity").mask("999-99-9999", { placeholder: "i.e.: xxx-xx-xxxx" });
var temp;
var regxa = /^(\d{3}-?\d{2}-?\d{4})$/;
$("#lts_patientsocialsecurity").focusin(function () {
$('#lts_patientsocialsecurity').val(temp);
});
$("#lts_patientsocialsecurity").on('blur', function () {
temp = $("#lts_patientsocialsecurity").val();
if (regxa.test($("#lts_patientsocialsecurity").val())) {
$("#lts_patientsocialsecurity").val("XXX-XX" + temp.slice(6));
}
});
};
Dataverse view

Thank you,
Jose G Diaz