Can you remove the magnifying glass search option on a reference field on a record producer?

mahudg2
Kilo Expert

Can you remove the magnifying glass search option on a reference field on a record producer? There is information in the table list that we do not want users to know of. If not is there a way to submit a string from a record producer and have it submit properly as a reference value?

 

Thanks!

9 REPLIES 9

rob_pastore
ServiceNow Employee
ServiceNow Employee

Aren't there any ACL's on verification code?   I would think they should be locked down so you can only see your own anyway.


bgworld
Giga Expert

Hi




Best way is to use ACLs   or the reference qualifiers to show verification codes only which user is authorized to see.




To hide Search icon:


You can always get rid of search icon using client scripts by tweaking the HTML DOM.


Id for Reference field search icon is: lookup.IO:<sys_id of variable>






Bhavesh Jain1
Giga Guru

Let me answer your question first.


Yes you can add string in a reference field but you will need to ensure that the string matches the display value of the reference field.


you could write this line in the script part of record producer.



current.called_id.setDisplayValue(<producer.name_of_string_field>);



caller_id is the reference field for example.


Note: String will have to be a valid caller else the caller_id field will not get updated.



Why do you want to remove the lookup icon. Even if you remove it, I can type ** in that reference field and it will show all the records so there is no point removing the icon. Let the icon be there and disable the add_to_list for that table so users are not able to add fields in the list layout.


Slava Savitsky
Giga Sage

If you do not want your users to be able to see the data in a table, you definitely need to put appropriate access control rules (ACLs) in place. There are many ways to get to the data, so removing the magnifier icon will not give you the proper level of security. Another feature that can come in helpful is reference qualifiers. They allow you to limit choices based on conditions (e.g. values of other fields, the identity of the user, and so on).



Using Access Control Rules - ServiceNow Wiki


Reference Qualifiers - ServiceNow Wiki


Reference Qualifiers for Service Catalog Variables - ServiceNow Wiki


Security Best Practices - ServiceNow Wiki


Mohammed Kemal
Tera Guru

Hi,

You can use a select box in the type and it will only bring the reference as a choice and makes it beautiful!!

Regards,

Mokemal!!