- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 11:39 PM
Hi Experts,
Good Day!
I am creating a new catalog item, in that i have created a variable reference type which is Requested for and it fetches the user full name.
The catalog item has other variables like first name , last name, employee Id, employee email, work-phone, these fields should be auto-populated based on change of requested for.
Could you please suggest me how can i do this.
Best Regards,
Atchutaram.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:06 AM
Hello,
You can write a on change catalog client script with the below code:-
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.getReference('requested_for', callBack);
function callBack(user){
g_form.setValue('firstnamevariable',user.first_name);
g_form.setValue('lastnamevariable',user.last_name);
g_form.setValue('emailvariable',user.email);
}
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 11:48 PM
Hi @Atchutaram
Try the below link :
I hope this help.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:06 AM
Hello,
You can write a on change catalog client script with the below code:-
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.getReference('requested_for', callBack);
function callBack(user){
g_form.setValue('firstnamevariable',user.first_name);
g_form.setValue('lastnamevariable',user.last_name);
g_form.setValue('emailvariable',user.email);
}
}
Please mark my answer as correct based on Impact.