Configure My Assessment Cards & Surveys .do page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2014 03:37 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2017 03:56 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2018 12:59 AM
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:
The following couple of lines in the HTML section around line 94 puts the additional fields in the array for display...
To display the new fields, edit the buildBody function in the client script around line 107 and line 115...