Configure My Assessment Cards & Surveys .do page

toneyvecchio1
Tera Expert

Hi Team!

We are firing up Demand and looking into modifying the page for My Assessments & Surveys: assessment_list.do

I am unable to find that URL anywhere in my CMS. Though I am not very CMS familiar I pretty much searched everywhere I could find and am at a loss. Could anyone explain how I might modify this page?

Ultimately my goal is on the nice display page is to use the Demand Name instead of "Demand" in both locations so that stakeholders.. you know.. know what Assessment they are about to take. I think I should be able to figure it once I can find it any help of course is appreciated!

SN Dev - Surveys.png

11 REPLIES 11

Nicholas P_ Ile
Tera Contributor

Seems not much has changed Im posting this in case anyone else comes across this .


Expanding on Adams use of the instance questions to display the Demand name I wrote a little query, which also works when you have multiple demands attached to one assessment.



I added this code to line 76 inside the while loop for the Assessment GlideRecord



// Customization for showing assessment record names


if(mt.name.getDisplayValue() == 'Demand'){



  var question = new GlideAggregate('asmt_assessment_instance_question');  


  question.addQuery('instance', gr.sys_id);  


  question.groupBy('source_id');


  question.query();  



  var count = 0;


  while(question.next()){


      if(count == 0){


          record.inst_demand = '<p style="margin: 0px">' + question.source_id.getDisplayValue() + '</p>';


          count++;


      }else{


          record.inst_demand += '<p style="margin: 0px">' + question.source_id.getDisplayValue() + '</p>';


      }


  }


}else record.inst_demand = '';




Add this to the client script section where you want it to be displayed I added mine under the Due Date section



if(data[id].inst_demand != ''){


  body += '<span style="color:' + data[id].inst_color + '; white-space:normal;">' + data[id].inst_demand + '</span><br/>';


}




The end result is displaying all the demands associated with assessment.


ServiceNow.png


dwblack
ServiceNow Employee
ServiceNow Employee

Just updating this for Kingston.  As before, the config file to change is assessment_list which is a UI Page.  You'll need to change both the HTML and Client Script sections.  In the example below I've added the demand number and description to the assessment card.  You'll need to check if it works with other metric types/tables.

 

Here's the end result:find_real_file.png

The following couple of lines in the HTML section around line 94 puts the additional fields in the array for display...

find_real_file.png

 

To display the new fields, edit the buildBody function in the client script around line 107 and line 115...

find_real_file.png