Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to populate display name of subject person in HR case form though UI page.

Ramya LR
Tera Contributor

Hi,

 

We have UI action "retrieve document" in the " HR form" where we have field called "user". On click of that UI action, subject person name should get auto populate in that user field, but i am getting user record, name is not getting auto populate. Is there any resolution for the same?

 

Regards,

Ramya.

1 ACCEPTED SOLUTION

Rahimunnisa Sha
Kilo Guru

@Ramya LR 

I got the issue. Could you please share the script screenshot. So that I can guide you.

View solution in original post

11 REPLIES 11

@Ramya LR 

Is the user field is referenced field?

And please share the screenshot of population of record in user field as well

Hi, I did some changes in the code, value is populating but it is taking case number instead of subject person name.

dialog.setPreference('sysparm_subject_name',g_form.getDisplayValue('subject_person')); 

RamyaLR_0-1672654935169.png

 

Change the User type - lookup select box and select the field as name and check it.

User field is on which table?

sys_user table.

Can you please share the screenshot from where you are fetching the subject person from the form.