- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 12:24 PM
I have a list collecter variable that currently is set to only display members of a selected assignment group. This is great as long as the group is in ServiceNow. Part of the build is for items that won't be an assignment group, but still uses the user lookup.
Can something be setup in the Reference Qualifier to the effect of "javascript:if(current.variables.var1=X no filtering);else(Group_member(current.variables.var2):
If that's not possible, should it be looking to client script, or similar to do the work?
Thanks!
Erik
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 12:29 PM
script includes aren't necessary... Yes is it possible and there are many out of the box fields with them. I have learned best by looking at out of the box examples over the last many years. Navigate to System Definition \ dictionary and search where reference qual contain "if" for many examples.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 12:27 PM
You should create a script include and call it from your reference qualifier.
javascript: new ScriptIncludeName().functionName()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 12:29 PM
script includes aren't necessary... Yes is it possible and there are many out of the box fields with them. I have learned best by looking at out of the box examples over the last many years. Navigate to System Definition \ dictionary and search where reference qual contain "if" for many examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2021 05:36 AM
Hello Michael
Do you know whether its possible to add an 'if/else if' in a reference qual? I have the 'if/else' working, however it seems to fail when i add additional conditions.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2021 08:37 AM
Yes, I don't see any out of the box examples to point you to, but if your reference qualifier has the "javascript:" prefix, everything past it is evaluated.