How can I populate the first name and last names of users in a form using reference from user table?

Ankit Pal
Tera Contributor

I want to customize a user form in resource module in ServiceNow, where if I select the name of the person from User table (using reference field) then first name and last names should be picked and filled up in their respective fields. Currently what happening is, the complete name is getting filled in first name and last name field in the form. 

1 ACCEPTED SOLUTION

Musab Rasheed
Tera Sage
Tera Sage

Hello,

Why do you want to create new fields when you can dot walking User field and bring in First name , last name etc ? once you select User then automatically first and last name will be autopopulated without any code, why don't you try that ? see I have done for incident, I'm dot walking caller field and bringing first name, last name and it is working fine for me , see steps.

find_real_file.png

find_real_file.png

find_real_file.png

Mark my answer as correct if that helps.

Regards

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

View solution in original post

2 REPLIES 2

Musab Rasheed
Tera Sage
Tera Sage

Hello,

Why do you want to create new fields when you can dot walking User field and bring in First name , last name etc ? once you select User then automatically first and last name will be autopopulated without any code, why don't you try that ? see I have done for incident, I'm dot walking caller field and bringing first name, last name and it is working fine for me , see steps.

find_real_file.png

find_real_file.png

find_real_file.png

Mark my answer as correct if that helps.

Regards

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

Hi Musab, 

 

Thanks for your detailed solution. It was very helpful for me to figure out the issue I had. 

 

 

Kind regards

Ankit