Mail script to add field from a different table

annasc
Tera Contributor

Hello,

I'm trying to add a mail script to my email notification but need help with the script. 

My email notification is on the "sn_vdr_risk_asmt_vdr_tiering_assessment" table.

I need help with the mail script to get the value from the field "TPRM-01.01" and ADD it on to my email notification.

This field "TPRM-01.01" (u_ucla_ociso_tprm_triage_tprm_01_01) is on the "sn_vdr_risk_asmt_ucla_ociso_tprm_triage" table.

Please kindly help me with the mail script.  Thank you.

 

1 ACCEPTED SOLUTION

Hi,

It is working based on your query that you provided because you are not giving any condition and using while Loop so will return all the values. If you need single value use If Loop.

Please add condition grrisk.addQuery(); then it will display the data.

You need to filter the data. Then Use like below

template.print("TPRM-01:01"+grrisk.getDisplayValue('u_ucla_ociso_tprm_triage_tprm_01_01'));

 

Hope you understood it!!

If it Please Mark Correct/Helpful, Thanks!! 

 

Regards

Pavankumar

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

View solution in original post

6 REPLIES 6

Hi Pavankumar.  That worked!  Thank you so much for your help and your time!  I've marked it as the correct answer.  Thank you!

Thanks,

Anna

Hi,

Good to hear. Keep learning.

 

Regards

Pavankumar

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar