We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

encrypted field value does not show in html document template

svani
Tera Contributor

Hi All,

 

facing one issue:

we have encrypted field in HR total rewards case ..that is salary field , we are generating employment document using document templates and used salary field to show salary in document using ${annual_slaary} but always salary information shows blank when document generated.

salary field encrypted using field encryption

How to resolve this.

 

Thanks,

Svani

1 REPLY 1

SupriyaWaghmode
Kilo Sage

Hello @svani  , 

 

For encrypted fields, you generally can't directly embed them in a standard background-generated document; you need a mechanism (like a flow, script, or web service) to decrypt the data first and then use that decrypted value in the.
You can follow the approach 

  • If the salary field is received from a third-party source, store it in an encrypted format within the form data. Then, implement a script to decrypt it when needed.

  • Restrict access so that only specific users can view the decrypted salary value.

  • When generating documents, use the decrypted salary field.

 

 If my response helped you, please click on accepted the solution SupriyaWaghmode_0-1767882028154.pngand consider giving it a thumbs-up 

SupriyaWaghmode_1-1767882028164.png. This helps others find the solution faster and keeps the community thriving. Thank you for your support! 

 

Thanks & Regards ,

Supriya Waghmode |ServiceNow Community Rising Star 2025🌟

www.linkedin.com/in/supriya-waghmode