Autopopulating a catalog item variable based on another
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 06:07 AM
Good morning,
I have created a catalog item which has a Requested For variable allowing the caller to select the user the request is meant for. I would like to have a read only variable field auto-populate the "sys_user.u_employee_id" of the user selected in the Request For field. How should I build this variable? My attempt is below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2023 09:07 AM
Hi ,
Please write the script include and client script to populate the required details of the employee.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 02:25 PM
Hi this should be pretty simple.
1. create the variable of "employee id" under the requested for.
2. set a ui policy with no conditions to always gray out (read only) the employee id field.
3. create an AJAX script that in client script takes the "requested for" variable and based on who that person is goes to the script include and brings over the users employee id.
HERE IS AN EXAMPLE OF HOW I AM DOING THIS BUT FOR OTHER FIELDS:
Based on requested for i populate department (along with other fields)
Client Script: