Get the first name in reference field.

Atchutaram
Tera Contributor

Hi Experts,

Good Day!

                    I have got a requirement, i need to get the first name in the reference type variable for a catalog item.

But when i am using reference type i am able to get full name of the user. I need to separate and get first name.

 

Attaching screenshot for your reference.

 

And i also need first name of logged in user to autopopulate in that reference field.

 

 

Atchutaram_0-1667473638253.png

 

1 REPLY 1

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

If you are able to get the full name, can you just extract the first name based by breaking the name based on space?

To get the first name of the logged in user use gs.getUser().getFirstName();

 

If you are asking that the reference field should show only the first name f the selected user then I'm afraid it will be a bogger change and not only limited to this catalog and i would suggest against that.

 

-Anurag