- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 07:52 AM
Hi All,
i have a requirement that i need to create a "info icon" beside the 'contact' field,
at the time of clicking the icon it need to display total count of incidents, problems, changes for that person(who is available in contact field),
at the time of clicking it need to display like this...
please help me how to create,..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2017 03:45 AM
Hi Venkatesh,
Because the script, which I have provided, is not taking the query which is Active or not. Please find the modified UI Macro script below in bold. Request you to set your quesry as per your requirement and give it a try.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_guid" expression="gs.generateGUID(this);" />
<j:set var="jvar_n" value="show_RITMs_${jvar_guid}:${ref}"/>
<g:reference_decoration id="${jvar_n}" field="${ref}"
onclick="showRelatedRecordList('${ref}'); "
title="${gs.getMessage('Show related Records')}" image="images/icons/tasks.gifx"/>
<script>
// show related list
function showRelatedRecordList(reference) {
try {
var displayValue = g_form.getDisplayBox(reference).value;
var title = 'Showing records related to: ' +displayValue;
var s = reference.split('.');
var referenceField = s[s.length - 1];
var query ='sys_class_name=incident^ORsys_class_name=problem^ORsys_class_name=change_request^active=true' + referenceField + '=' + g_form.getValue(reference);
var gdw = new GlideModal('show_list');
gdw.setTitle(title);
gdw.setSize(750);
gdw.setPreference('table', 'task_list');
gdw.setPreference('sysparm_query', query);
//gdw.setPreference('title', 'A New Title');
gdw.render();
} catch (e) {
jslog('error showing related list');
jslog(e);
}
}
</script>
</j:jelly>
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2017 06:16 PM
Hi Venkatesh,
That's okay. Please modify the 'Attributes' field as mentioned below and check once. Please replace the UI Macro name in the appropriate position. Lets say you have created the UI Macro as named 'user_realted_records'. Saying so, you need to add this one in the replace of the bold characters below.
ref_contributions = sherpa_user_show_incidents;add_edit_user;user_show_incidents;ui_macro_name, ref_ac_columns=name;email
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2017 08:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2017 10:27 PM
Hi Venkatesh,
Please modify the line 21 as of below:
w.setPreference('sysparm_query', "sys_id!="+g_form.getUniqueValue()+"^active=true^u_contact="+v+"^ORref_incident.caller_id="+v+"^GROUPBYsys_class_name^sys_class_name=incident^ORsys_class_name=problem^ORsys_class_name=change_request");
Better I would like to request you to type task.LIST in your navigation search bar and apply the filter which you want. Once you are done, right click on the filter copy the query and paste it in Line number 21 as: w.setPreference('sysparm_query', 'PASTE YOUR QUERY HERE');
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 05:44 AM
No, it is still displaying incidents, and catalog tasks,
I think after groupby it is not possible to take the condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 08:58 AM
Thank you so much Amlan.