- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2020 01:48 PM
I am trying to add a filter to the slushbucket list that shows when the user opens the change request form, goes to the impacted Services/CI related list and clicks on Edit. The requirement I have is to filter out all business services that have been retired (install_status !=7).
I have followed the steps on the link below and but I dont see the edit default filter section.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0720545
I opened a case with SN support and they suggested to follow these other steps (see below), I am an unexperienced ServiceNow admin and have no idea how to create the script required on step 5
1. Navigate to System Definition > Relationships
2. click NEW button
3. Applies to table = task_cmdb_ci_service <-- this I am not sure if it is the right value.
4. Queries From Table = task_cmdb_ci_service <-- SN support told me to provide this table name here
5. In 'Query with' field add your custom code logic. you will need to make a GlideRecord() query to lookup up a cmdb_ci_service record
here is the code I came up with, but is not working
var efr = new GlideRecord('cmdb_ci_service');
efr.addquery('install_status','!=',7);
efr.query();
var efrarr = [];
while (efr.next())
efrarr.push('' + efr.sys_id);
current.addQuery('sys_id', efrarr);
I will greatly appreciate your help with either method. thank you in advance!
Efra
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 02:07 PM
I believe this is the issue. In my PDI, UI Policy action hides edit default filter (visible = false) whenever condition is true but it is reverse in your case.
Can you check history if this UI Policy is changed recently. You may also try to deactivate this UI Policy and check if it works. I believe field(Edit Default Filter) will appear in list control, once you deactivate this UI Policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 01:52 PM
Can you check if Reverse if False is marked as true ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 01:55 PM
yes it is marked as true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 02:07 PM
I believe this is the issue. In my PDI, UI Policy action hides edit default filter (visible = false) whenever condition is true but it is reverse in your case.
Can you check history if this UI Policy is changed recently. You may also try to deactivate this UI Policy and check if it works. I believe field(Edit Default Filter) will appear in list control, once you deactivate this UI Policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 02:30 PM
Finally! I was able to see the Edit default filter field once I made the UI policy inactive. then I added the filter I needed and confirmed that the slushbucket list DOES have the filter I want.
I wonder if making this UI policy inactive is the way to go?
anyway, I wanted to thank you so much for your help. I got it working!!!
Efra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 03:08 PM
I am glad it worked. Out of the box, In UI Policy Action, Visible is marked as False but for some reason it is marked true for you.
In any case, Please mark my comment correct/helpful, so that this thread is closed.