How to add a 'Default filter' to the 'Affected CIs' related list to the 'Add' button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2016 12:50 PM
Hello Community,
I am trying to filter out the Configuration Items (CIs) with empty names in both 'Edit' Slush bucket and 'Add' button sys popup window of 'Affected CIs' related list. I am able to use the 'Default filter' from the List control of the 'Affected CIs' related list header, but I am trying to find ways to apply the same filter to the 'Add' button sys popup window under 'Affected CIs' related list.
Any thoughts?
I tried to add Default filter on the 'Add' button's sys popup of list hearer, but I couldn't add the 'Edit default filter' field to the form on this List control.
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 08:08 AM
Okay I just upgraded my dev instance to Geneva and I see it. Very interesting as when I upgraded, my edit button was now omitted and I see the "add" button.
The ui action calls the GlideAjax function AssociateCIToTask
I can't find anything you'd have to update other than modifying this somehow. Maybe someone else has an idea that is easier. You can disable the add button if you want to stay with the slushbucket edit as well.
P.S. You can create a default filter in Geneva using this step (only filters the displaying of the list.): Create a default filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2016 10:16 AM
Hi Hari,
In case you cannot perform a CMDB clean up,
Please find the solution to add a default filter to the "Add" button of Affected CIs related list.
- Go on the script include "AssociateCIToTask"
- Add the encoded query needed (could be dynamic)
- Omit the edit button (the affected CI could be removed from the related list)
Customization :
Script Include : AssociateCIToTask
var url = new GlideURL("task_add_affected_cis.do");
url.set("sysparm_crSysId", chgReqId);
url.set("sysparm_view", "associate_ci");
url.set("sysparm_add_to", addToTable);
url.set("sysparm_stack", "no");
url.set("sysparm_table", latestClassAdded);
url.set("sysparm_parent_class", parentClass);
url.set("sysparm_query",'nameISNOTEMPTY'); // Add default filter - Name IS NOT Empty; could be dynamic if needed
return url;
Result :
Thanks,
Regards,
Lionel COMANDINI
ITEO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2016 11:46 AM
Hello Lionel,
We have a filter defined in filter table. Can we use that filter in the script. We don't want to change the script instead we can change the filter under system definition->Filters that will change in the affected CI's.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 04:50 AM
Could you tell how can we make sure that the filter which is applied " NameisNotEmpty" should be read only? No one should be able to modify it as now I can modify this filter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 05:27 AM
If you want to stop them from editing it. When you click add and get the pop up, you can still edit the list control.
At the top of the list, right click --> Configure --> List Control -->
You can then assign "filter roles" (to give access to certain roles only) or check "omit filters" to omit the filter from the display.