- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2025 10:31 AM
Hi Community, Iām working on a Service Catalog item and need some help with a dynamic reference field. I have two variables Department and Doctor (Reference) When a specific department is selected, the Doctor variable should only display doctors who belong to that selected department. Can anyone guide me on how to achieve this? Should I use a Reference Qualifier or a Catalog Client Script?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2025 10:43 AM - edited ā07-29-2025 10:44 AM
Hi @manishtyagi
let's go with a reference qualifier on the Doctor variable.
Try something like:
javascript: 'department=' + current.variables.department
EDIT: Please note that's automatica transcript, it shall be "javascrip t :" (no spaces) not javascript:
/* If my response wasnāt a total disaster āļø ā drop a Kudos or Accept as Solution ā āļø Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2025 10:48 AM
Hi @manishtyagi,
----------------------------------------------------------------------------------------------------------------------------------------------------
Yes, you can definitely achieve this using Reference Qualifier (Advanced)
and you can write it like ->
javascript: "u_department="+current.variables.department //replace the variable names with your original ones.
Now what it will do is that it will fetch the only doctors which belonged to the selected department
If you need further help do let me know.
--------------------------------------------------------------------------------------------------------------------------------------------------
Please mark my response Helpful and Accept as solution
Thanks & Regards
Mayank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2025 10:43 AM - edited ā07-29-2025 10:44 AM
Hi @manishtyagi
let's go with a reference qualifier on the Doctor variable.
Try something like:
javascript: 'department=' + current.variables.department
EDIT: Please note that's automatica transcript, it shall be "javascrip t :" (no spaces) not javascript:
/* If my response wasnāt a total disaster āļø ā drop a Kudos or Accept as Solution ā āļø Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2025 10:48 AM
Hi @manishtyagi,
----------------------------------------------------------------------------------------------------------------------------------------------------
Yes, you can definitely achieve this using Reference Qualifier (Advanced)
and you can write it like ->
javascript: "u_department="+current.variables.department //replace the variable names with your original ones.
Now what it will do is that it will fetch the only doctors which belonged to the selected department
If you need further help do let me know.
--------------------------------------------------------------------------------------------------------------------------------------------------
Please mark my response Helpful and Accept as solution
Thanks & Regards
Mayank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2025 10:54 AM
@mayankkumar if it is a variable it will most likely not be "u_department", otherwise you wrote exactly what I did, so I must agree ššÆ
/* If my response wasnāt a total disaster āļø ā drop a Kudos or Accept as Solution ā āļø Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2025 11:07 AM
Hi @GlideFather,
I'm referring "u_department" to the field on the table from where doctor field is referenced not variable.
Why and where would I mention "u_department" as a variable? You can clearly see it's "current.variables.department" and "u_department" is assumed to be a field on referenced table. Maybe you're confused here. And I did not write what you wrote even I didn't know that you already posted a response here when I start writing this post has 0 responses
So, don't say that I wrote from your response.
---------------------------------------------------------------------------------------------------------------------------
Please mark my responseHelpfulandAccept as solution
Thanks & Regards
Mayank