- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 12:04 AM
Hi,
We have variables which should not be displayed on Catalog form, but should be mandatory on Catalog Task.
These reference type variables need to have their query set onLoad and onChange of a Catalog Task.
I'm getting the query successfully via Ajax call using Catalog Client Script and Script Include, but I'm unsure how to get it applied on the variables.
I've tried below and both were unsuccessful:
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 12:21 AM
Hi @Tracy5
Script Include returns reference qualifier string e.g. "sys_idINx,y,z".
On the reference field, Type Specifications > Use reference qualifier > Advanced.
In the Reference qual field:
javascript: new ScriptIncludeName().FunctionName();
Example:
javascript: new PositionUtils().getPeopleLeaderUsersRefQual();
Note: Replace : with an actual colon.
Thanks
dgarad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 12:14 AM
Hi @Tracy5 ,
There is no need of client script to restrict reference table data.
You can add reference qualifier on reference catalog variable.
You can even call the script include from the variable. You can write the logic in your script include so that it will return comma separated sys id's of the groups.
I started answering community questions recently. If my answer helped you in any way, please mark it as helpful or correct. It would be a great boost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 12:21 AM
Hi @Tracy5
Script Include returns reference qualifier string e.g. "sys_idINx,y,z".
On the reference field, Type Specifications > Use reference qualifier > Advanced.
In the Reference qual field:
javascript: new ScriptIncludeName().FunctionName();
Example:
javascript: new PositionUtils().getPeopleLeaderUsersRefQual();
Note: Replace : with an actual colon.
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 06:54 PM
Yep this works, just need to ensure that the script include is callable by the client