- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2020 01:19 AM
I would like to use dynamic reference qualifier for variables of Service Catalog.
I create script in System definition > Script Includes. I can use the script as dynamic reference qualifier for column of Form. But I can't for variables of Service Catalog.
Can't dynamic reference qualifier be used for variables of Service Catalog ?
Variable or column is List and it refers sys_user. As I would like to use complicated condition filter, I would like to use dynamic reference qualifier.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 01:40 PM
The cause was my easy mistake...
I missed application scope.
I refer other application(e.g. scope is x_my_app) script from global application. My wrong qualifier was below.
javascript: new UserLookup().getUsers();
But correct qualifier was below.
javascript: new x_my_app.UserLookup().getUsers();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 03:55 AM
I user dynamic reference qualifiers for list collector variables often. Your reference qualifier is similar/the same as on a list field, or any other reference field when you call a script include
javascript: new UserLookup().getUsers();
With this qualifier, your script include (with the Client callable box checked) must return a comma-separated list of sys_ids prefaced with 'sys_idIN'. I usually push query result sys_ids into an array, then
return 'sys_idIN' + arr.join(',');
Keep in mind that this will filter the list collector left side on form load, so depending on the number of results, the list may still be loading after the rest of the form is displayed.
Let me know if this still isn't working for you, or want another set of eyes on the script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 01:31 PM
Thank you for the answer.
I have resolved by other way. The cause was my easy mistake...
But your answer is very helpful for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 01:40 PM
The cause was my easy mistake...
I missed application scope.
I refer other application(e.g. scope is x_my_app) script from global application. My wrong qualifier was below.
javascript: new UserLookup().getUsers();
But correct qualifier was below.
javascript: new x_my_app.UserLookup().getUsers();