Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to calculate name based on firstname and lastname field ?

akhileshv
Tera Contributor

The value should reflect automatically in the name field while writing in firstname and lastname fields.

6 REPLIES 6

Danish Bhairag2
Tera Sage

Hi @akhileshv ,

 

Where do u expect this to happen?

 

Have you created any catalog item (form)?

Because on user table this happens OOTB.

 

Thanks,

Danish

 

Screenshot 2024-01-06 at 12.19.15 AM.png

Hi @akhileshv ,

 

Please try the below code what i have suggested in a client script.

Please create two different onChange client scripts. 1 for first name n other for last name.

 

Try below code in that scripts plz.

 

var firstName = g_form.getValue('first_name');

var last name = g_form.getValue('last_name');

 

var finalValue = firstName+ ' ' + last name;

 

g_form.setValue('name',finalValue);

 

Thanks,

Danish

 

Danish Bhairag2
Tera Sage

@akhileshv ,

 

If it's on a form then u can try a on change script on last name & first name field with below code.

 

var firstName = g_form.getValue('first_name');

var last name = g_form.getValue('last_name');

 

var finalValue = firstName+ ' ' + last name;

 

g_form.setValue('name',finalValue);

 

Thanks,

Danish