- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2022 12:01 PM
I have two reference variables on a catalog item, one for the user and the other for the user's department. I've looked at several other posts, all with the same solution but for some reason it isn't working for me. Can someone help, please?
Variables:
User reference variable (variable is requested_for):
Department reference variable:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 08:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2022 12:10 PM
Hi,
What are you trying to do?
Since you have selected a user as a reference variable, you know the department that user belongs to.
Why do you need a second variable for the department?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2022 12:15 PM
Hi,
I just realized I didn't finish adding requirements.
I want the user's department to fill in automatically when the user is selected because we need the department as a separate variable for the Orchestration workflow.
I created a separate variable to satisfy orchestration, but I don't want the user to have to fill in their department.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2022 12:51 PM
Ah, I see. If you need it to fill the department automatically, you will need to write an onChange client script, that runs when you set the "user" variable.
You will need to perform a AJAX call, to get the value from the server side.
If you are ok with manually selecting the department, and query from the selected user, then change your reference qualifier to:
javascript: 'sys_id =' + current.variables.user.department;
Where "user" is the name of the user-variable on your form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 08:16 AM
Thanks - the onChange client script was what I needed.