Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
There is a list type field named 'Reviewers' on Policy records.
On the list view of Policies, we want to highlight with field styles, where any of the user listed under Reviewers is inactive.
In the screenshot attached below, Daniel Zill is inactive user, and if he is present in Reviewers, the respective column value is applied with defined field styles.
<img width="809" height="370" alt="image" src="https://github.com/user-attachments/assets/b483207e-f3ba-4db7-a717-d392694eaf50" />
<img width="433" height="107" alt="image" src="https://github.com/user-attachments/assets/5129038f-d210-40f4-bcd8-1727d791edca" />

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//The below code followed by "javascript:", inside 'Value' field for the List type Reviewers field's Style record will do the condition check.

var answer = false;
var arr=[];
arr = current.reviewers.split(',');
for(i=0; i<arr.length; i++){
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id',arr[i]);
gr.query();
if(gr.next()){
if(gr.active == false){
answer = true;
}
}
}
answer;

//The Style field then must be populated with the style we want to apply. I have applied "background-color: blue;" "text-decoration:line-through;"
Loading