Refresh Data Table From Instance Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2017 08:29 AM
Hello all,
OK I have created a Data Table From Instance widget and unfortunately due to the initial query being so long I cannot show the breadcrumbs. The problem I have is that I would like to be able to have the table widget refresh back to it's original long query when the user starts using the 'Show Matching' and 'Filter Out' functions. At the moment the only thing I have quickly put on is a page refresh button calling a function to use $window.location.reload(). However, as you can imagine this is not a good solution.
Can anyone advise me on a good solution where I can refresh just the widget.
Many thanks.
Martin
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2017 10:58 AM
Hi,
Another option is using the record watcher so the list updates in real time so no need for a refresh.
nathanfirth has explained how this can be used on serviceportal.io.
This is the url to this blog - Real Time To Do App using Service Portal & Record Watchers - ServicePortal.io - Service Portal, CMS,...
Thanks,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2017 01:35 PM
Thank you Dan, the thing is it will not be a record updated or anything that will invoke the widget refresh but a button.
Basically when the Data Table Widget displays initially it will have a huge filter so I cannot show the breadcrumbs otherwise it will look terrible. So when the User carries on using the filtering functions on the list it will grow even more, so I just need a button that when they click it, the list will return to the original query.
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2017 03:56 PM
Hi Martin,
Did you find a solution to this? I'm also looking to add similar functionality to a Data Table from instance widget.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2017 11:37 PM
Unfortunately not Peter, I was moved off that project before a solution was discovered. As a terrible temporary solution I just refreshed the page until a solution was reach, that invoked the huge query again. I wouldn't mind going back to that issue as I think it was a good one to work on, it's just having the time to investigate.
Since then I have used the sysparm_fixed_query parameter so I might incorporate that so the User would still have the 'All' link in the breadcrumbs but when they clicked it they would only be able to go back as far as the initial fixed query that I coded.
Hope that helped