Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Answered

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.

  • Verified answer
    oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    Re: How to camouflage PII in Portal PowerApps?

    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

  • SueA Profile Picture
    555 on at
    Re: How to camouflage PII in Portal PowerApps?

    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

     

  • oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    Re: How to camouflage PII in Portal PowerApps?

    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
    Re: How to camouflage PII in Portal PowerApps?

    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?

     

  • D365-Developer Profile Picture
    Microsoft Employee on at
    Re: How to camouflage PII in Portal PowerApps?

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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35