The CreatorCon Call for Content is officially open! Get started here.

Reference Field in ACL Script

John Spirko
ServiceNow Employee
ServiceNow Employee

I have a custom reference field called Dept.   It's in the incident table as u_dept.   It references that user_group table.   I have 2 records that have data in that field.

incidentRecords.PNG

I'm trying to get the text vale from that field so I can use it in my ACL script.   I've tried to access it with all that is in the screenshot below but I can't seem to retrieve the value.

ACL_Script.PNG

Can anyone tell me how I can get the value of "Dept"(u_dept) into a string?

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello John,



getDisplayBox only works at client side. At server side use current.u_dept.getDisplayValue();


View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello John,



getDisplayBox only works at client side. At server side use current.u_dept.getDisplayValue();


Chandu Telu
Tera Guru

Hi john,



What is your requirement   why you what to get the field vales from list view


if you want to remove the access to fields in list view check below screen shot it may help you


find_real_file.png


I think the question is only on how to get the value of field in script. No?


Yes, that's right.   I don't have any requirements to limit view at the field level.