
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2015 05:57 AM
Hi,
I am new to serviceNow. I was stuck in a problem. I want to flash a field in the list view of the table. The flashing will be based on, any update via email on a particular record.
I have tried a piece of simple javascript code in "Values" field in styles.
function initBlink()
{
var state = false;
setInterval(function()
{
state = !state;
var color = (state?'red':'green');
document.getElementById('test').style.color = color;
}, 1000);
}
Looking forward for your help.
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2015 01:52 AM
Hi, Swarnadeep.
If I understand your question properly, the incident is updated by inbound email actions.
So You can do following:
- the Inbound Email Actions script should mark the incident any way your prefer (e.g. current.comments = "incident was updated by email")
- As Berny Alvarado and Jim Coyne say: create a special style (using Field Styles) on a list based on a condition like this:
javascript:current.comments.indexOf('updated by email') > 1
To create a flashing dot near some field (I tested it on Fuji): Upload an animated gif to System UI -> Images and write a field style like this:
background:transparent url('flashing.gif') -20px -20px no-repeat;
- Create a List Button for incident table (System UI -> UI Action) with script like this:
function startReloadList(){
location.reload();
}
setTimeout(function() { startReloadList(); }, 10000);
The script refreshes list every 10 seconds. Also You can insert "startReloadList()" into the onclick field to reload the list by the button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2015 10:51 PM
Great suggestion Jim!! Gifs are classic and always cool!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2015 01:52 AM
Hi, Swarnadeep.
If I understand your question properly, the incident is updated by inbound email actions.
So You can do following:
- the Inbound Email Actions script should mark the incident any way your prefer (e.g. current.comments = "incident was updated by email")
- As Berny Alvarado and Jim Coyne say: create a special style (using Field Styles) on a list based on a condition like this:
javascript:current.comments.indexOf('updated by email') > 1
To create a flashing dot near some field (I tested it on Fuji): Upload an animated gif to System UI -> Images and write a field style like this:
background:transparent url('flashing.gif') -20px -20px no-repeat;
- Create a List Button for incident table (System UI -> UI Action) with script like this:
function startReloadList(){
location.reload();
}
setTimeout(function() { startReloadList(); }, 10000);
The script refreshes list every 10 seconds. Also You can insert "startReloadList()" into the onclick field to reload the list by the button.