0

Let me describe my problem: I have a table for all my IT-Services. I reference to this table more than once, for different purposes. Most of the time I need to reference to the name of the service. That's why I keep the name as displayed value. One Column of that table is a service_id (custom field) which is for example "Service_004". Now in a catalog request Item the User has to fill in the service_id in a reference field. But since I have the name as displayed value, and I need it in other forms, I am unable to reference to the service_id.

Using the variable attributes field I managed to let the service be found using the autocomplete function. But in the reference field I still get the servicename. I know that I can change the display value in the dictionary, but this breaks other functions. So what I need is to change the display value just for one reference field.

Also I tried to create a new table called IT-Services2 with reference to my table IT-Services. Then I switched the display to true in the new table for my service_id, but this will even change it in the parent table.

RayofCommand
  • 4,054
  • 17
  • 56
  • 92

2 Answers2

0

Perhaps an onChange client script utilizing g_form.setLabelOf() ?

http://wiki.servicenow.com/index.php?title=GlideForm_(g_form)#setLabelOf

Maybe I'm not fully understanding your question...

SN Bliss
  • 196
  • 2
  • 9
  • Thank you SN Bliss, I edited my question to make it a bit clearer. I don't need to change the label. – RayofCommand Dec 06 '16 at 08:12
  • Hmmm, at a higher level: There is an entire module that comes with SN out of box for handling and presenting business services. You've seen? – SN Bliss Dec 08 '16 at 02:49
  • https://docs.servicenow.com/bundle/helsinki-it-service-management/page/product/service-portfolio-management/task/t_ServiceOfferings.html – SN Bliss Dec 08 '16 at 02:49
0

I ran into this issue before, what you can do is create select box variable and use an on load client script to populate the list with the service_id(s) from the table you are referencing.

I would write a script include to pull the data from the table and call it from the client script via GlideAjax.