Change label of a field brought from another table

PaulaaO
Mega Sage

Hi Community,

I have the following use case: on the Risk form we displayed the field which brings the name of the project, as per the screen shot below. I would like to change the label of this field to Project Name but I get "invalid update" message - is it because Risk table is not an extension of Task, that's why it doesn't let me to do the change?

Is there a way to achieve this at all?

find_real_file.png

 

Thank you.

Paula

1 ACCEPTED SOLUTION

Not applicable

I don't think you can do this as the field isn't extended to that form at the table level, it's effectively just being dot-walked to and displayed on your risk form.

You can use g_form.setLabelOf('<field_name>','<label>') to change labels via client script but i don't think you'll be able to do that here as the field isn't actually there.

If you really need to do this you could create a duplicate string field on the source task form and call it project name, populate it with whatever goes in the short description field with a simple business rule, hide it on your task form and dot-walk to that on your risk form.

View solution in original post

9 REPLIES 9

Table name should Risk and not Task. see how it is there in my OOB instance, they are renaming short description field. Mark my answer as correct if that helps

find_real_file.png

Please hit like and mark my response as correct if that helps
Regards,
Musab

Hi @Musab Rasheed I think there is a bit of misunderstanding - I don't need to rename the short_description field from RISK table.

As you can see in my initial post, I added on Risk form the short_description field belonging to Task in order to display the name of the project - this is the field I would like to change the label of, otherwise I have 2 short_description fields: one belonging to risk and one belonging to task which is listed on the Risk form and I'd like to differentiate these. If I change the label of short_description of Task it would change it across the platform which is something I do not want.

I think the issue resides with the element, hence the reason the system does not let me to put Risk as the table and short_description as the element; I tried to tweak the element to risk.task.short_description but it doesn't work either..

 

Got it, it's not possible then, either you have to try for setLabelof function or better you create a string field and write onchange client script to populate project name in that, that would be simplest solution.

Link for SetLabelof solution : 

https://community.servicenow.com/community?id=community_question&sys_id=8604fed91bf10410a59033f2cd4bcbc9

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

Hi Paula,

If all your queries are addressed feel free to mark my answer as correct and close the thread.

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

Not applicable

I don't think you can do this as the field isn't extended to that form at the table level, it's effectively just being dot-walked to and displayed on your risk form.

You can use g_form.setLabelOf('<field_name>','<label>') to change labels via client script but i don't think you'll be able to do that here as the field isn't actually there.

If you really need to do this you could create a duplicate string field on the source task form and call it project name, populate it with whatever goes in the short description field with a simple business rule, hide it on your task form and dot-walk to that on your risk form.