The CreatorCon Call for Content is officially open! Get started here.

Why does the journal field table saves intercepted text value?

adolfo8911
Tera Contributor

Hi everyone, 

I'm currently working on a Before business rule (insert and update) that intercept values on the Comment and Work_notes fields. It compares them to a regex for NPPI and if it finds a match it will replace that matched value with ****. Currently Im finding that when there is a match the BR does mask the value and replaces it with *** as expected but the activity is also showing the original value (I'm getting two entries). 

I checked the sys_journal_field table and it only shows the record with the ****. Has anyone had a similar request where they needed to mask NPPI on entered comments and work_notes, if so how did you do it?

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@adolfo8911 

you should have before insert BR on sys_journal_field rather than your table

This will ensure the data gets masked during Insert only and not during the update

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I'm targeting the sys_journal_field, which is the table where the entered values get saved. Please take a look at what I currently have in the BR in the screenshot. With this simple BR, both the original value and the "replace value" will be shown in the activity section of the task. 2025-10-14_11-24-48.png