How to display Answer for Assessment which is choose by requestor in Emil Body?

sruthig
Tera Expert

Hi Team,

How to display Answer for Assessment  in Emil Body?

I have created notification on "asmt_metric_result" Table. I want to display One of the assessment answer which is choose by requestor in notification body.

Notification Table - asmt_metric_result

Condition

Metric  - Question

String Value  - Answer

find_real_file.png

What will contain

I want to display one of the Assessment answer in Email Body

Question in Assessment -  Please select countries

Answer may be multiple countries (Multiple select box)

Please suggest.

 

Regards,

Sruthi

5 REPLIES 5

Abhijit4
Mega Sage

Hi Shruti,

You will have to write email script to show all countries in email body. Use below script,

var countryArray=[];
var grCountry=new GlideRecord("core_country");
grCountry.addEncodedQuery("sys_idIN"+current.country_variable_name_here);//replace 'country_variable_name_here' with your field name
grCountry.query();
while(grCountry.next())
{
countryArray.push(grCountry.getDisplayValue());
}
template.print(countryArray.join(","));

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Regards,
Abhijit
Community Rising Star 2022