- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2021 10:35 PM
Hi,
I have a field "MSSQL Instance" which is referring table "cmdb_ci_db_mssql_instance" table.
And there is another field "database" where i need to populate all databases running on the particular instance name selected in "MSSQL instance" field as above.
to achieve this i am setting my second field "database" as lookup select box and referring the table "cmdb_rel_ci" and in lookup value field i am choosing "Child". The idea is to set the reference qualifier to match the parent with MSSQL instance field and then show relevant child values.
I am stuck at both the steps. In database fields i am not getting correct values. It is showing only sysIDs.
Also below is my reference qualifier which doesn't seems to work.
javascript:'parent=' + current.variables.mssql_instance
help!
ServiceNow Community Rising Star 2022/2023
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2021 06:30 AM
Hi,
something like this
javascript:'parent.sys_class_name=cmdb_ci_db_mssql_instance^' + 'child.sys_class_name=cmdb_ci_db_mssql_database^' + 'parent=' + current.variables.mssql_instance;
Also in the variable attributes of the lookup select box add this
ref_qual_elements=mssql_instance
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2021 10:40 PM
Hi,
Did you set the variable attributes for the lookup select box
ref_qual_elements=mssql_instance
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2021 10:45 PM
please share your lookup select box variable configuration
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2021 02:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2021 02:24 AM
Hi,
the table "cmdb_rel_ci" doesn't have display=true for any of the field
Can you try to set the Lookup label field as Child for that lookup select box variable
I could see it is empty
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader