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 / How to camouflage PII ...
Power Pages
Unanswered

How to camouflage PII in Portal PowerApps?

(0) ShareShare
ReportReport
Posted on by 555

I am collecting Social Security in a Portal PowerApp. I would like to turn 123-45-6789 into say 123-4#_#### as soon as user keys in the value. How do I achieve it? Is there a REGEX or Java Script to achieve this? IF so, can you please show me this?

Thank you.

Categories:
I have the same question (0)
  • D365-Developer Profile Picture
    Microsoft Employee on at

    This is an example: Edit fiddle - JSFiddle - Code Playground

  • SueA Profile Picture
    555 on at

    Hi:

    Thank you for your response. But the JavaScript you provided did not work in the "Form Options" of Portal Management's Advanced Form nor CSS worked in the liquid Code Editor on the Portal to camouflage the Social Security. Can you please tell me where does this script go in the Portal Management or on the Portal?

     

  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    hi @SueA the approach above would be creating an additional input control and manipulating via JS

     

    there are other similar codes available online as well: https://stackoverflow.com/questions/40513950/javascript-input-text-masking-without-plugin

     

    can you give more details of your requirement? users would still be able to inspect the page and check the real value.. also what's the business value on this requirement? 

  • SueA Profile Picture
    555 on at

    Thank you, Oliver for your reply.

    Here is the Requirement:

    “Each digit is only visible as it’s typed and then ideally is hidden as a number sign (#) after a few seconds (e.g.: 123-4#-####) or optionally when clicked next button at the bottom of that page and will show the masked number if clicked “Previous” button at the bottom of the next page of the form giving submitter a sense of security when submitting important PII such as SSN in an online form. However, the actual and complete value goes directly to secure Dataverse and email notification when the form is submitted.”

     

    Is there a Java script or another way to achieve this? Can you explain in detail and step by step as I am novice, please?

    My column/field name is:       pde_socialsecuritynumber

     

  • Verified answer
    oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    sorry about the delay, I think the easiest way here would be turning your input element into a Password type:

    $("#pde_socialsecuritynumber").attr("type","password")

    this is a quick win, but they wouldn't see the value when typing, it would always be hidden

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
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard