- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2024 06:53 AM
Hello.
I would like to call a script include in the reference modifier of a catalog variable.
Here, I would like to select the company and department to which I belong, and then narrow down the groups I want to browse by "name".
Since the table has values ​​such as BK and FG, it is assumed that only those containing the strings BK and FG will be queried.
Currently I am writing the script with only company variables.
This is a screenshot.
Select company from the Question Choice table
Question Choice table
Call script include.
"variables.---_test_employee_company" is the company catalog variable
script include; Query the sys_user_group table for names containing the string of the received argument.
Group selection (no company selected)
Group selection (select company)
In this case, why don't I see anything with the string BK in its name?
thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2024 07:26 PM
Problem solved.
The cause was that the company selection type was set to reference.
It worked by changing the type to Select Box.
For more information, please visit the URL below.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0749932
https://note.com/rhayahi/n/n14c260f7209f#60a3818c-bc3e-45a5-a09a-e4745da55675
thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 07:15 PM
Checking the log shows 'com.glide.script.RhinoEcmaError: "ComNam" is not defined.'
A message was displayed.
This is the Reference qualifier I think this means that the argument cannot be passed to the script include.
javascript: new ---test_IdDepartmentUtil().GetComNamQuery(current.variables.---test_employee_company);
This is a reference qualifier call statement, is there a problem?
The part following current.variables is the name of the catalog variable.
Is that correct?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 07:37 PM
HI @nakamura323 your script include must be server side. not client callable
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2024 07:26 PM
Problem solved.
The cause was that the company selection type was set to reference.
It worked by changing the type to Select Box.
For more information, please visit the URL below.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0749932
https://note.com/rhayahi/n/n14c260f7209f#60a3818c-bc3e-45a5-a09a-e4745da55675
thank you.