How to calculate name based on firstname and lastname field ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:42 AM
The value should reflect automatically in the name field while writing in firstname and lastname fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:44 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:55 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:49 AM
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