- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2016 11:05 PM
Hello- I have a requirement to refresh a specific widget on a pages in service portal after specific time period. On My page, I have used 3 different widget and I don't want to refresh whole page to get the updated list (list data is coming from another instance using rest call) so I couldn't use $watch here.
Hence, I would like to update specific widget so that it make a server call and bring updated data from rest call and show in view.
Kindly let me know if anyone has implemented the same.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2016 10:26 PM
Thanks Nathan..You have pointed me in correct direction!! The only catch here is that setTimeout won't work on client controller instead we have to use $timeout or $interval to call the function at regular intervals.
Many Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 02:10 AM
Hello Abhishekte,
If I understand correctly you wish to call the server and on return refresh widget on ServicePortal right ?
I would suggest the logic be like:
-> Add a dynamic block to SerivcePortal with your specified time interval (javascript setInterval)
-> In this interval, after the time, execute a Scheduled Import or Data Source to obtain data from rest Call
-> Wait for call to execute, monitoring sysimport_log
-> on answer receiving, query appropriate table that the import goes to
-> put the values on the widget
-> reload page, or put the data dynamically.
Regards,
Michal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 10:00 AM
He's referring to the new Service Portal in Helsinki which does not use content blocks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 10:09 AM
You could try doing something like this:
function($scope,spUtil) {
setTimeout(function(){
spUtil.update($scope);
}, 3000);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2016 10:26 PM
Thanks Nathan..You have pointed me in correct direction!! The only catch here is that setTimeout won't work on client controller instead we have to use $timeout or $interval to call the function at regular intervals.
Many Thanks.