web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Masking SSN field with...
Power Pages
Unanswered

Masking SSN field with custom code but is being save with the actual value of the mask

(0) ShareShare
ReportReport
Posted on by 67

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

josegdiazv_1-1686597575578.png

Thank you,

 

Jose  G Diaz

Categories:
I have the same question (0)
  • Saud Ali Profile Picture
    812 Super User 2024 Season 1 on at

    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.

  • Jose Gregorio Diaz Profile Picture
    67 on at

    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:

     

    josegdiazv_0-1686762403181.png

     

    Thank you,

     

    Jose G Diaz

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 70 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard