function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RitikRitik 

Mask part data of long text area

Hi,

I have a field of data type Long Text Area wherein I have some data in below mentioned format. Here I have to mask some text (not everything) from this data (Please refer the example below ). Can anybody help me in achieving this or atleast tell me the appropriate approach for this.


Example:
Sample Input (Data in in the LONG TEXT AREA field):

Name     : ABCDEF
Age        : 20 Years
Email    : testEmail@test.com
Body    : This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.
          This is a sample text. This is a sample text. This is a sample text. This is a sample text.
Some Other Data: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
DOB        : 01-01-1905
Some Other Data1: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data2: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data3: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data4: This is a sample text. This is a sample text. This is a sample text. This is a sample text.


Sample Output (which is required)
Name     : XXXXXX
Age        : XX Years
Email    : XXXXXXXXX@XXXX.XX
Body    : This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.
          This is a sample text. This is a sample text. This is a sample text. This is a sample text.
Some Other Data: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
DOB        : XX-XX-XXXX
Some Other Data1: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data2: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data3: This is a sample text. This is a sample text. This is a sample text. This is a sample text.          
Some Other Data4: This is a sample text. This is a sample text. This is a sample text. This is a sample text.      



Here name, age, dob etc. are masked.

Any help would be great.



Regards,
Ritik
RitikRitik
I have referred a link https://developer.salesforce.com/forums/?id=906F0000000AchrIAC, but I am unable to implement it in my scenerio.
Problem:
1) My Values are dynamic (also in terms of length of data).
2) I have to process it for more than a million record.
Ramon PereiraRamon Pereira
Create masks for this field is possible, however it would be very complex.
A simple way would you create separate fields for each existing value in its textArea and each field you create the mask specifies. When the User save the record, capture the value of the fields and inserts in his textArea as his example.

To create masks, see this example: https://plugins.jquery.com/tag/mask/
RitikRitik
Hi ra_br,

thanks for your quick reply.
creating new fields would be a new business requirement, however can you please throw some light on how is possible to create mask for this field without creating new fields......


regards,
Ritik