- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 07:05 AM
Hello,
So for this problem I need to add a dynamic filter option for a widget, so end users can customize what gets displayed on their list. Much like in ServiceNow, I want to be able to add a breadcrumb as well as custom filter to the table. I found this thread from a while ago https://community.servicenow.com/thread/226535 and if you scroll down starting from Jesus, I see that this has not been answered in the last two years. Hopefully somebody has by now?
Thanks
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 08:56 AM
That's what happens when you add these two parameters to your widget.
show_breadcrumbs: true,
enable_filter: true,
This is the condition to show the filter breadcrumbs
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 08:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2018 10:06 AM
Hi sanjivmeher,
I have two more questions:
1) Is there any way I could add this to a simple list widget? I know that you can do this.showFilter = true; but that seems to only filter out keywords, unlike the one above.
2) Is it possible to add a 'view all' button in the bottom right hand corner of a data table instance such as the one on a simple list?
Thanks,
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2018 07:30 PM
1) Is there any way I could add this to a simple list widget? I know that you can do this.showFilter = true; but that seems to only filter out keywords, unlike the one above.
Yes you can. instead of that I can suggest you use the same widget (Data Instance Filter) and just show one column in the widget, which will make it look like a simple list widget and you also get the cool number pagination. And if your container s 3:1, put the widget in the 1 box, so that it looks like a simple widget
2) Is it possible to add a 'view all' button in the bottom right hand corner of a data table instance such as the one on a simple list?
Yes. You can do that. like the below link in simple widget. Just a link pointing to a page, which has count as all. You need to clone the existing page. And pass the required variables like table, filter, count etc to it.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 07:54 AM
Hi Sanjiv,
So I am a little new to this but this is what I have so far. I tried adding it to the 'data table filter' widget I created but nothing shows, so I'm pretty sure I am missing some parts to this. Would I have to clone the OOB 'Data Table' widget instead and adjust from there? Also what other parts from the Simple List widget should I get on the scrips to get it to work. I feel as if I am overlooking something simple.
thanks,
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2018 09:19 AM
Hi sanjivmeher
I have followed the example above to enable my filter, it works as expected but now I have another question. When I click the filter to open up on a table, the existing bread crumb is not loaded. I checked my code above to make sure my filter was enabled and still nothing. The only way the filter to display the breadcrumbs is only after the user clicks on the breadcrumbs. How would I make it automatically load?
This is how it looks when I initially click the filter drop down
This is how I'd want it to look when you first click the drop down, but it only happens after the user clicks the breadcrumb
I currently have made a clone of the data-table widget to add the view all button (view-all-table) and a data-table-from-instance(dynamic-filter-table) widget that shows the dynamic filter as mentioned before. My dynamic-filter-table widget calls the view-all-table widget to display information, and in the view-all-table code I've only adjusted it to have the view all button. Am I missing something?