I've been trying to understand and use the built-in out of the box function, pxGetMaskedValue_Text that takes the following parameters
(String property, String restrictionMethod, int unmaskCount, String maskPaddedString, int displayLength, String maskingChar)
I am having problems using this function (unable to get it to work), furthermore, I am trying to use this function in a report definition query too.
Lets say I have a string of 10 digits ("1234567890"). I am trying to mask the first 6 characters and display only the last 4. How should I do that? What if I want to mask a SSN?
I was unable to get more information on what restrictionMethod and maskPaddedString means, and even playing around with this function didn't provide any results to the original string passed as property
While I'm not sure on everything the function can do or is meant to do, this is what I was able to determine regarding your questions via local testing:
The "restrictionMethod" parameter appears to be used to determine how the masking is done. The code indicates that you can use "FirstN" to have the unmasked characters at the beginning of the string, "LastN" to have the unmasked characters at the end of the string, or "FullTextMask" to mask the whole string.
The maskPaddedString parameter appears to tell the function to skip certain characters before masking, however in my testing they were hidden/removed rather than masked.
To mask the first 6 characters of your example string, you can use a call like this in a property set:
That does solve my issue. The explanation was perfect too. Do you, by chance, know what Displaylength parameter is used for? I've tried playing with numbers but it doesn't seem to affect the result in any noticeable way
Posted: 4 years ago
Posted: 10 Apr 2019 13:39 EDT
Kurt Waltz (KurtW_GCS)
Senior Principal Engineer, Technical Support, Industry Apps