I found an undocumented feature in Dataverse while exploring a topic for today’s blog post. The feature basically helps us to mask the value if the value matches with the RegEx (Regular Expression) that we are set. This feature can be handy if the customer has a strict requirement to not allow anyone to read some type of value. For example, you want to hide Email, Social Security Number, etc.
First, I create a new string attribute named “tmy_demostring” and set the “Enable column security” to check:
Next, if you go to your Solution page (make.powerapps.com), you can go to New > Security. Here you can create a Secured masking rule and an Attribute masking rule (this means that both components are solution-aware components – you can export it via solution and import it to higher environments):
For this demo, I created the below Attribute masking rule:
As you can see in the above, I created a Regex using “(?<=^.{3}).*(?=@)” which will show the 3 letters of the email and hide the rest. The domain part will not be masked. If you are wondering how I can create it, the answer is just “copilot” your requirement and let the bot give you the possible solutions ๐คฃ.
In my environment, Microsoft also already gives some Masking rule samples that you can “Advance Find” > Masking Rules:
Next, you only need to create an Attribute masking rule. Here is the record I created:
Once the above step is done, you can test the result (if you put email value):
If we put another string value (not email), it will not mask the value:
Even currently this functionality runs on top of the Field Security Profile, it doesn’t respect the rules (the mask feature will always run):
Again, this feature is not yet documented very well (but I found some of the articles that possibly show this feature that you can read here and here).
Happy CRM-ing!