How to get the current date to show up on the service portal widget, Business Services Status?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 09:27 AM
Today is the 25, but it only shows for July 24 and lower
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 07:29 PM
Hi Mitchell,
Check for these lines in server script.
data.dates = [];
for (var i = 5; i > 0; i--) {
var d = new GlideDate();
d.subtract(1000 * 3600 * 24 * (i - 1));
data.dates.push(d.getDisplayValueInternal());
}
i = 5 specifies the days in past for which the status needs to be fetched. I have checked my System Status page and it shows me today as well.
Darshak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2017 12:24 AM
Hello Mitchell,
Can you share the screenshots of widget code where it is fetching the dates. So it helps us debug better.