- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2018 03:16 AM
Hi Community,
I'm looking for a way to auto-populate the Job Title and Initials (user_id) when the selection of the "employee transferring" is completed. All the information is contain in the user record already i just need a way of it pulling the information from there into the field.
E.g. in the example below, employee is Aaron Allen, how can i set the Job Title and Initials to pull in their user record details.
The field names on the sys_user table are below:
Job Title = title
Initials = user_id
I know how to do this for the current logged in user of the Portal but what if selection is not the current logged in user e.g. submission on behalf of a colleague.
Many thanks,
James
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2018 03:34 AM
Write an onchange catalog client script on employee transferring field.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var user = g_form.getReference('<field_name_of_employee_transfer>', doAlert); // doAlert is our callback function
}
function doAlert(user) { //reference is passed into callback as first arguments
g_form.setValue('<field_name_of_employee_inital>',user.user_id);
g_form.setValue('<field_name_of_employee_title>',user.title);
}
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2018 03:34 AM
Write an onchange catalog client script on employee transferring field.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var user = g_form.getReference('<field_name_of_employee_transfer>', doAlert); // doAlert is our callback function
}
function doAlert(user) { //reference is passed into callback as first arguments
g_form.setValue('<field_name_of_employee_inital>',user.user_id);
g_form.setValue('<field_name_of_employee_title>',user.title);
}
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2018 04:24 AM
Thank you that works a treat!!! :)))))