how can i highlight a field on a form.

reyservicenow
Tera Expert

during my research i have found:

Form fields in docs

but I was thinking to use that orange indicator for a change to the incident form that highlights the fact that a due date is about to pass or has passed.

how can I create a new indicator... and what is the best way to do this? with a business rule?   a BR to run after the form has loaded? and then checks the due date field on the incident form?

suggestions anyone?

let me involve the CSS master jim.coyne

Thanks

1 ACCEPTED SOLUTION

I don't think you'll be able to do it in a business rule, but you could use a field style to do this if you don't want to use a client script.



Define field styles



And here's an example of using an advanced condition that involves dates.



Advanced style selection


View solution in original post

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

You can write onload client script to change field colour based on your requirement.



Below is sample code



function onLoad() {


    var table_name = g_form.tableName;


    var commField = table_name + '.caller';


    gel(commField).style.backgroundColor="red";


}



Regards.


Sachin


i was thinking more of a BR that will have this in it and the script for it to make to highlight the field yellow, so let me try to use that script you put there and change the color to orange or yellow lets see what i can do with that script you provided.




find_real_file.png


I don't think you'll be able to do it in a business rule, but you could use a field style to do this if you don't want to use a client script.



Define field styles



And here's an example of using an advanced condition that involves dates.



Advanced style selection


great thanks i will try the above