Re: RFE: A Countdown / Timer / Stopwatch type field...
Hi Joe, you can also implement this with a small bit of Javascript code ... added to a View Field should do the trick, or to target a display only field change the reference of idCountdown to your arid field (eg. arid888000111). html body span id=idCountdown/span /body script type=text/javascript // Countdown from a set number of seconds (eg. 300) // OR set future date to countdown from (eg. end of epoch time) // *** INSTRUCTIONS *** uncomment either of the next two lines var target = new Date().getTime() + (300 * 1000); //var target = new Date(Jan 19, 2038).getTime(); // time vars var dd, hh, mm, ss; // function to update countdown every second setInterval(function () { // seconds from now until target var now = new Date().getTime(); var seconds = (target - now) / 1000; // parse seconds into time vars dd = parseInt(seconds / 86400); seconds = seconds % 86400; hh = parseInt(seconds / 3600); seconds = seconds % 3600; mm = parseInt(seconds / 60); ss = parseInt(seconds % 60); // find and set id=countdown in document document.getElementById(idCountdown).innerHTML = dd + 'd ' + hh + 'h ' + mm + 'm ' + ss + 's'; // indicate when countdown has completed if (ss0) { document.getElementById(idCountdown).style.color = 'red'; } }, 1000); /script /html Hope this helps. -Jim ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years
Re: RFE: A Countdown / Timer / Stopwatch type field...
That was my first thought as well. Using Javascript it is a bit difficult to take a workflow action when the time is up though. Not impossible, just outside the normal Remedy realm. Joe's Idea would bring this back into a pure Remedy realm. Sylvain YVON has posted some great documentation around making Javascript with with Remedy workflow; including how to call an AL Guide via Javascript. Enhancing MT user experience with JavaScript; Part 1https://communities.bmc.com/docs/DOC-21816 Enhancing MT user experience with JavaScript; Part 2https://communities.bmc.com/docs/DOC-21818 Jason On Thu, Oct 10, 2013 at 5:17 AM, Jim Bruce jimjbr...@yahoo.ca wrote: Hi Joe, you can also implement this with a small bit of Javascript code ... added to a View Field should do the trick, or to target a display only field change the reference of idCountdown to your arid field (eg. arid888000111). html body span id=idCountdown/span /body script type=text/javascript // Countdown from a set number of seconds (eg. 300) // OR set future date to countdown from (eg. end of epoch time) // *** INSTRUCTIONS *** uncomment either of the next two lines var target = new Date().getTime() + (300 * 1000); //var target = new Date(Jan 19, 2038).getTime(); // time vars var dd, hh, mm, ss; // function to update countdown every second setInterval(function () { // seconds from now until target var now = new Date().getTime(); var seconds = (target - now) / 1000; // parse seconds into time vars dd = parseInt(seconds / 86400); seconds = seconds % 86400; hh = parseInt(seconds / 3600); seconds = seconds % 3600; mm = parseInt(seconds / 60); ss = parseInt(seconds % 60); // find and set id=countdown in document document.getElementById(idCountdown).innerHTML = dd + 'd ' + hh + 'h ' + mm + 'm ' + ss + 's'; // indicate when countdown has completed if (ss0) { document.getElementById(idCountdown).style.color = 'red'; } }, 1000); /script /html Hope this helps. -Jim ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years
Re: RFE: A Countdown / Timer / Stopwatch type field...
Yeah I know this is possible through embedding a javascript, but like you stated tweaking existing time fields to exhibit that behavior would mean you bring it into the Remedy realm. I have worked at a few sites where if you were to use custom java code or code borrowed from the internet - they go absolutely not. Its not OTB so you are not allowed. They attribute their rigid approach to company policies to keep things OTB as much as possible to lower costs of maintenance of their applications. Its not very uncommon. So it gets hard to sneak foreign stuff under the covers. I have even worked at some companies that even denied me creating my own DB views of certain things to show up as custom view forms.. Leave alone using external java code.. Joe _ From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Jason Miller Sent: Thursday, October 10, 2013 11:49 AM To: arslist@ARSLIST.ORG Subject: Re: RFE: A Countdown / Timer / Stopwatch type field... ** That was my first thought as well. Using Javascript it is a bit difficult to take a workflow action when the time is up though. Not impossible, just outside the normal Remedy realm. Joe's Idea would bring this back into a pure Remedy realm. Sylvain YVON has posted some great documentation around making Javascript with with Remedy workflow; including how to call an AL Guide via Javascript. Enhancing MT user https://communities.bmc.com/docs/DOC-21816 experience with JavaScript; Part 1 Enhancing MT user https://communities.bmc.com/docs/DOC-21818 experience with JavaScript; Part 2 Jason On Thu, Oct 10, 2013 at 5:17 AM, Jim Bruce jimjbr...@yahoo.ca wrote: Hi Joe, you can also implement this with a small bit of Javascript code ... added to a View Field should do the trick, or to target a display only field change the reference of idCountdown to your arid field (eg. arid888000111). html body span id=idCountdown/span /body script type=text/javascript // Countdown from a set number of seconds (eg. 300) // OR set future date to countdown from (eg. end of epoch time) // *** INSTRUCTIONS *** uncomment either of the next two lines var target = new Date().getTime() + (300 * 1000); //var target = new Date(Jan 19, 2038).getTime(); // time vars var dd, hh, mm, ss; // function to update countdown every second setInterval(function () { // seconds from now until target var now = new Date().getTime(); var seconds = (target - now) / 1000; // parse seconds into time vars dd = parseInt(seconds / 86400); seconds = seconds % 86400; hh = parseInt(seconds / 3600); seconds = seconds % 3600; mm = parseInt(seconds / 60); ss = parseInt(seconds % 60); // find and set id=countdown in document document.getElementById(idCountdown).innerHTML = dd + 'd ' + hh + 'h ' + mm + 'm ' + ss + 's'; // indicate when countdown has completed if (ss0) { document.getElementById(idCountdown).style.color = 'red'; } }, 1000); /script /html Hope this helps. -Jim ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years _ARSlist: Where the Answers Are and have been for 20 years_ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years
RFE: A Countdown / Timer / Stopwatch type field...
This is something I wished the AR System had OTB a few months ago as well. https://communities.bmc.com/ideas/3590 A Countdown / Timer / Stopwatch https://communities.bmc.com/ideas/3590 type field... This is a really simple idea.. Whether its worth it or not is another question.. Background: Recently when I was developing an application, I had integrated the AR System to ETAdirect, an external application that is a tool to mobilize field force.. Before creating and scheduling appointments for techs, the representative when on call with the customer queried ETAdirect through a WSDL call, to get what is known as capacity from ETAdirect. Since multiple techs query this capacity perhaps at the same time with multiple callers calling in across the state or country, there is a good chance that a capacity requested might be not quite valid after a few minutes, as the tech offers options to the customer. This is when I wished I could easily without the need for polling or interval based Active Links, display a countdown timer, wherein the requested capacity would be no longer valid after say 3 minutes or whatever.. Countdown / Timer / Stopwatch Field?: It would have been really cool to handle a situation such as this if the representative had a visible ticking clock set at lets say 3:00 going down to 2:59, 2:58, 2:57 0:00 just like the Amazon or eBay experience when buying stuff from Lightning Deals or the last few seconds of an auction.. A suggestion towards achieving this could be leveraging the existing Time field with a certain display type to convert it to a Countdown, or a Timer or Stopwatch. I think that would be really really cool.. It would give the AR System a pretty cool bell and whistle considering its a tracking system... There are various workarounds you can device for this, but I can't imagine any being cleaner or neater than if there was a OTB field available to display a clock that showed a user that he/she is on the clock for completing a certain task. Cheers Joe D'Souza ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years