How to Change Field Label for Reference Field???

G24
Kilo Sage

Hello smart folks.

We have a field on our Service Catalog Requested Item form that actually reflects a value in the Request table.  It looks like this:

1.png

 

If I go to Configure - Form Layout, the field looks as follows:

2.png

 

I would like for the Label of this field, on the form, to be simply "Requested for", to limit confusion for our users.  How can I achieve this?

 

Please Note, I am NOT able to change the value of the system property "glide.short.labels".  That property is "false" and it needs to stay that way because we have several list views with fields from multiple tables, and we need to see the table names in that context.  Is there another option?  Thanks!

1 ACCEPTED SOLUTION

G24
Kilo Sage

g_form.setLabelOf('request.requested_for', 'Requested for');

 

//This worked; with a DOT instead of an underscore, between "request" and "requested_for".  Thanks @Satyapriya 

View solution in original post

8 REPLIES 8

Anand Kumar P
Giga Patron
Giga Patron

Hi @G24 ,

 

You can simply use the "Requested For" field in the "sc_req_item" table, as it holds the same user as the "Request.Requested For" field. There's no need to duplicate or dot walk field since the "Requested For" field is readily available in the table.
(or)-Write on load client script for that if dictionary entry for requested for label update not works

AnandKumarP_0-1696185074814.png

AnandKumarP_1-1696186119696.png

 

 

 

Mark it helpful if it works.
Thanks,

Anand 

I'm kind of assuming that someone who came before me wanted to reduce the number of fields in use, so they decided to use the Requested For person of the Request everywhere, instead of using both fields.

So I decided not to take your suggestion in this case, but thank you.  I'm not sure what would be involved in keeping the 2 fields in sync everywhere they might be modified.  I guess some business rules, but I think I'll avoid that approach for now.

Mehta
Kilo Sage
Kilo Sage

HI @G24 , 

 

GO to the field Label on the form and Click Right key of the mouse, Then go to dictionary and change the label of the field and save it.

 

Mehta_0-1696184549056.png

 

Configure Dictionary for Requested For on Request Table: 

Mehta_1-1696184653737.png

 

One thing to cross verify is the client script. Is there any client script available on RITM Table which is changing the Label of the above mentioned Dot walked field. If yes then instead of configuring the dictionary label. you need to change it in the client script.

Mark it Correct, If it Resolves your Query.

 

 

Riya Verma
Kilo Sage
Kilo Sage

Hi @G24 ,

 

Hope you are doing great.

 

For your query I guess this article shared by ServiceNow, Dot walking fields shows full column label when used in related lists/table lists. might help. It did help in my scenario.

 
 
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma