- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2020 10:29 AM
Hi everyone,
I am just starting out to learn about the platform and I need a bit of help.
Can anyone tell me how to mask a part of a field for certain users.
Example:
If an User inputs his card number (1111-2222-3333-4444), I want to make it so that a non-admin user sees the field masked in the following way (****-****-****-4444).
Can anyone help me in regards to what is the best way to do this.
Thank you !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 07:38 AM
oh, i see
what is the requirement for masking? do you need to mask while user typing it? (high risk, user might mistype the numbers) or after submit?
if the latter, i would do following:
1) add client script onchange for the field to format user's input in the format you need, so if user typing 1234555511112222, you script formats it 1234-5555-1111-2222
2) create business rule on insert/update and just have the masked field update as below
var maskedPrefix="****-****-****-";
current.yourfieldmasked = maskedPrefix + current.userinputfield.toString().slice(-4);
what do you think?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 08:14 AM
Hi Alex are you looking to make the field blank or are you looking for the effect of '******'.
Easiest way around if you've got the admin access would be to do an access control,
Go to access controls,
Operation: read
Role: //add the role/s you want it to be exclusive to and save.
And then a second one using the same process for write.
This will basically make it as though its not there at all only to the people with the specific roles.
Ensure you also have the security admin role.
Please mark as helpful or if its resolved the issue mark as correct!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 11:51 PM
Hi Andrew,
Thanks for the reply !
I specifically need the field to be masked with "****-****-****-".
I believe the solution provided by Nataliya is the correct one and will work for me.
Thank you very much and have a nice day !