How to Create a Table with Specific Variables from the Incident Table?

cwolfe01
Giga Guru

Hi all,

 

I'm writing a mail script, and I want to include a table, similar to the image below that has specific variables from the incident table

Screenshot 2023-08-18 103048.png

I was looking through some code from a different email script, and found a method called TXT_NotificationUtils().getRITMVariables() that seems to be creating a table in this format with variables from the RITM. Is there a similar method to do the same thing, but with specific variables from the incident table?

Alternatively, I'm a little familiar with creating an html table in ServiceNow, but how could I apply styling to make the table look like this?

1 ACCEPTED SOLUTION

Eswar Chappa
Mega Sage
Mega Sage

Hi @cwolfe01 the below community articles will help you with your use case:

 

https://www.servicenow.com/community/now-platform-forum/table-formatted-variable-summary-in-an-notif...

 

https://www.servicenow.com/community/developer-forum/how-do-i-script-creating-a-table-in-a-mail-scri...

 

Cheers, hope that helps

Eswar Chappa

*** Please mark as "Correct" or "Helpful" as appropriate ***

View solution in original post

2 REPLIES 2

Eswar Chappa
Mega Sage
Mega Sage

Hi @cwolfe01 the below community articles will help you with your use case:

 

https://www.servicenow.com/community/now-platform-forum/table-formatted-variable-summary-in-an-notif...

 

https://www.servicenow.com/community/developer-forum/how-do-i-script-creating-a-table-in-a-mail-scri...

 

Cheers, hope that helps

Eswar Chappa

*** Please mark as "Correct" or "Helpful" as appropriate ***

AndersBGS
Tera Patron
Tera Patron

Hi @cwolfe01 ,

 

instead of looking for a script, have you considered extending the incident table. By this you can utilize the incident table fields together with new custom fields.

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Vest regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/