Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

populate HR Record Producer variables in HR Document Template

Deepak Singh Ra
Tera Contributor

Hello,

 

We need to populate Record Producer variables in HR Document Template. When I am trying to add variables in below format, it is not working and giving blank value.

 

City: ${variables.city}

 

However direct fields are working fine, for eg: ${assigned_to}

 

Can someone help me on this?


Regards,

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepak Singh Ra 

check this link

Adding variables to the body of a HR Document Template breaks its preview 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

No it just work for first variable. In case of multiple variables it never works.

abirakundu23
Giga Sage

Hi @Deepak Singh Ra ,

It should be work. Please follow below screenshot. In HR document template add ${variables.<variable name of record producer>}

abirakundu23_1-1714061642733.png

abirakundu23_2-1714061676605.png

 

 

Please follow link for more reference: Add customized variables in a document template (servicenow.com)

Please mark helpful & accept answer if it's worthy for you.

I am doing the same thing . I never works .