- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2021 01:44 AM
Hello Experts,
We have designed a Catalog item and it has 2 variables. Requested For (this fields get auto populated based on logged user). Requestor Full Name (This is a Single line text field).
I want to display requested for Full Name i.e. First Name, Middle Name and Last Name in the String field. If anyone changes the Value of requested for then automatically Requestor Full Name should be updated with the new Value.
How can I achieve this?
Regards,
Shoheb
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2021 01:59 AM
you can use this
getReference() with callback method using onChange client script on Requested For variable
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var ref = g_form.getReference('requested_for', callBackMethod);
}
function callBackMethod(ref){
var firstName = ref.first_name;
var lastName = ref.last_name;
var middleName = ref.middle_name;
var finalValue = firstName + ',' + middleName + ',' + lastName;
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2021 02:43 AM
Glad to know.
Please mark appropriate responses helpful as well.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2021 02:44 AM
Please close your previous questions by marking appropriate response as correct.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader