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
Hi Saud,
Thank you for the reply but not sure how would I do that? could you please send me a screenshot? right now I have it configured in the corresponding specific step the multistep form, see the picture below:
Thank you,
Jose G Diaz
Hi @josegdiazv ,
I would suggest masking your column on form submission. When you set some value on Portal before record saved the same value is pushed in the Dataverse.
Thanks,
Saud
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43