Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

To mask a certain field based on the user authentication

Avatar

Level 2

Hi,

I want to know if there is any way we could mask a particular field in any of the services.

I will explain a scenario. Person A fills a form with confidential information (like SSN etc) along with other information. Person B receives the form. He should be able to see the information filled by Person A but not the confidential information. Finally when the form goes to the stakeholder Person C, he should be able to see all the information including the confidential information.

Is this possible in any of the services in the Process Orchestration? Or in the designer? Kindly respond

Thanks,

Sandhya

2 Replies

Avatar

Former Community Member

It is possible. You should be having a field in your XSD schema for the username. Bind the username to a hidden field in your form.

In the designer, in form initialize event,

write the code: if hiddenfield.rawValue == "person A"

                             subform1.presence = "hidden";

                       if hiddenfield.rawValue == "person B"

                      {

                             subform2.presence = "hidden";

                             subform1.presence = "visible"   }

In your process, when your moving from one step to other step, update the uname accordingly and the form will respond according to the username.

Regards,

Chaitany

Avatar

Former Community Member

Since it's part of the form data, the user could always download the form and dissect it.

Why not keep the SSN on the server as a process variable, removing it from the data that will populate the second rendition?